I have a conditional formatting rule (color scale) applied to a row (e.g. A1:Z1). I want the to duplicate this rule for another row, but when I use Paste Special -> Paste Conditional Formatting Only (or Paint Format tool), it simply makes the color scale rule to apply to the sum of ranges (e.g. A1:Z2). The problem is that it won't process ranges separately, it will just join them into a single range and find the biggest / smallest number over the joint range, rather than in individual ranges.
The same applies if the range is defined in format "A1:Z1,A2:Z2".
What I want is just to avoid defining the same color scale rule for different rows manually.
Note that Google Sheets behaves here differently from MS Excel. In Excel I get the desired behaviour very easily and intuitively: I create a rule for a row, select it, copy, then paste special formatting only. For a scale from smallest red to biggest green, this is the output:
!Excel colour scale example]1
If I do the same steps in Google Sheets, the output is quite different:
It is clear that GS does not duplicate a rule, but simply adds a new range to the computed joint range the original rule applies to.
Is there a way in GS to do the same conditional rule duplication that Excel does, or I just have to re-create it manually?
Click any cell covered by the original conditional formatting
In the menu, pick format/conditional formatting...; this opens a side panel with all conditional formats that apply to that cell
Click the format you want to duplicate
Do not edit anything yet
Click "Add another rule" on the bottom. This will save any changes you made to your original format ... and open a new clone.
Change the range on the newly created clone.
Repeat 5 and 6 until you enter the last range
Click "Done".
I am not saying I LIKE this answer, but it is the only solution I can come up with:
Apply Custom Formatting using a Custom formula for each color value. In your example, this means 6 entries in the Custom Formatting. For each one, use the below formula. For the Highest value, use:
=A1=LARGE($A1:$G, 1)
For the second highest value, use:
=A1=LARGE($A1:$G, 2)
Increment the last number for each ranking, setting a color for each as well. I hope your range to Z does not mean you are color coordinating that many items. My concern there would be not just having that many conditional format items, but having that many colors be meaningful.
There is also the MAX() and MIN() functions if you just want the highest and lowest.
=A1=MAX($A1:$G)
or
=A1=MIN($A1:$G)
as well as MEDIAN() and SMALL() which is the opposite of LARGE(). In case you want the X largest and Smallest, or Maximum, Minimum, and Median.
Related
I'm creating an expenses spreadsheet, and I want to be able to compare what each person has paid on each item, to what is owed. If it's < what's owed, it will be red, if =>, green. I know I can manually conditionally format each cell to do this, but I'm looking for a solution I can use to simplify the sheet for month-to-month editing, with potential to add new expenses or remove them without having to later manually conditionally format the new expense.
I've looked into a few others with similar questions and tried some custom formats. First I went with the simple "if less than column [whichever it is next to] set color to red" and no luck, and one suggested a formula like this: =($H2>=$G2)*($H2<>"") though honestly I can't say I fully understand it. I have a grasp on it to a certain extent due to my coding background, but not quite enough. I feel this would be way easier if I was coding and could just use a for each statement...
I expected the cells (specifically for the greater than function) to be green, but actually it's counting all cells as less than the ones next to them, regardless of the values.
Imgur images
your issue is that the conditional formatting is offset by 1 row because you trying to apply it on range H1:H13 but formulas you use works with range H2:H & G2:G. therefore do it like this where you start from H2:
I am trying to create a highlight in my sheet that will allow me on a row by row basis to highlight the version numbers that do not match the master column. I also want the rule to ignore anything that is marked as N/A as it should not be considered.
e.g. column E houses the latest version v1.0.2, columns H-O list the versions available at various locations, two of them are still on v1.0.0. I want any that do not match the master version (outdated) to highlight.
How can I do this and have it apply to each row individually? So row 7 values are highlighted based on E7 but row 8 values are highlighted based on E8. These are not plain numerical values but include text.
So I have figured it out after a bit of messing around based on answers to similar questions. All using Conditional Formatting.
Make sure that each rule created has the correct range applied so only that section of the sheet is checked (in my case H6:O18).
This ensures that whatever rule I add, it only applies to that part of my sheet.
Custom formula "=$H6:$O6<>$E6"
To explain this, it looks at the range of data entries (From the H to O columns - starting with row 6) and compares it to (in my case) the master entry in column E to compare. Basically asking do the entries differ?
The $ symbols are included in front of the column values to mark them as unchanging. The row numbers do not have the $ symbol and so can change. Therefore it checks H6:O6 against E6, but will check H12:O12 against E12. Maintaining the column but not the row.
Additional rule added "Cell is empty"
This is set to not highlight - applied to the same range (H6:O18). This is placed above the previous rule to overrule it. Therefore any blank cells are not highlighted as different, they are ignored.
Additional rule: "Text is Exactly"
This is applied to the same range and ordered above the original rule to again overrule it. The text to check is "N/A". Again this is set to not highlight or alter anything. This ensures that entries marked N/A are ignored much like blank cells.
An extra addition I included was duplicating the first formula but changing the <> to = and changing the highlight to green. This highlights anything that matches while any differences are highlighted red. N/A or blank cells are ignored.
Example of highlighted cells + Formula
I've seen lots of answers for various other conditions under which to do this. However I can't seem to modify any of these to work for a date range. What I want is for the column color of column E to change if the date in column H is between today and 5 days from today.
I've tried varying versions of this formula: H3:H150 =today() +5 with no success
This doesn't give me the range of between now and 5 days from now but I could do multiple rules like this and just go down on each one(=today() +4, =today() +3, etc) but obviously I need this rule to work first.
Thanks!
Conditional formatting is more helpful than you seem to be expecting. Clear formatting from the column to be formatted, select it and Format, Conditional formatting..., Format cells if... Custom formula is and:
=and(H1>today(),H1<today()+6,H1<>"")
Then select fill of choice and Done.
This should format the next five days (change the angled brackets around for the past five days).
Setting the range is achieved with selection of the column to be formatted (not the one with dates in it - H). If only to apply to Rows3:150 (and in general it is a good idea, for speed of processing, to restrict the ranges to which CF is applied) then either start by selecting Rows3:150 in the column to be formatted (instead of the entire column) or adjust the Apply to range for the rule, but in either case use H3 in place of H1 in the formula above.
CF should automatically apply the rule as written to the first row in the selected range and then adjust it for the second and subsequent rows in the way copying down would adjust the formula (if at all) were it in a cell in the sheet.
I'm trying to use conditional formatting to highlight the maximum value over multiple ranges. That is, find the one highest value in said ranges and highlight all instances of it. I have been able to use conditional formatting to highlight the highest number of one column, but not over multiple.
The ranges in question are: G3:G13,J3:J13,M3:M13,P3:P13,S3:S13,V3:V13
Screenshot of the spreadsheet
The versions I have tried either highlight every value in the first row, multiple values but not the highest one, or nothing at all.
An alternative is to use a MAX function and place that value in another cell (the little 4 in the bottom right corner) and use conditional formatting based on that value. However, it's not a particularly elegant solution nor have I been able to make that work properly.
I am using New Google Sheets and am familiar with custom formatting and custom formulas for doing so.
You need to use Conditional Formatting Custom Formula.
Set Apply to Range
G3:G13,J3:J13,M3:M13,P3:P13,S3:S13,V3:V13
Enter in Custom Formula is
=G3=(max($G$3:$G$13,$J$3:$J$13,$M$3:$M$13,$P$3:$P$13,$S$3:$S$13,$V$3:$V$13))
Pick your formatting style.
You may have to scroll down the Format cells if menu to find Custom Formula.
Basically, I'm part of a community and when someone applies for membership, they have to provide a Player ID in their application. When we accept their application, we copy information into a Google Spreadsheet about them such as Player ID's and GUID. We want a way of indicating on our spreadsheet if the Player ID is incorrect. If the number put in is less than 17 digits in length or is any bigger, it would indicate that it's wrong by either formatting the cell to be a light red or it being replaced with "ERROR". I just need something that would indicate if it's incorrect.
Go to Format tab in the google spreedsheet, then go to Conditional Formatting, then in the Apply to range box, put down your range, say A1:A30 the range where you want to apply your formatting. Then, in the Format cells if, choose Custom formula is, the last one in the dropdown list. Then put this formula in the formula box just below it:
=and(not(len(A1)=17),not(isblank(a1)))
then in the formatting style, choose any color that suits you. Then click DONE. It should work!
Update
in a helper column, say column B, you can put this formula in B1 and copy down until the last row:
=If(isblank(A1),"",(IF(LEN(A1)=17,"OK","ERROR")))
this should work