I am trying to have custom formula for conditional formatting, but it doesnt seem to work with the 2 conditions...:
Columns TS Time
Row1 Y 80
Row2 N 85
Row3 Y 60
Row4 N 4
Column 'Time' --> Should be
Red if Time >= 80 and TS = 'N'
Orange if Time >= 80 and TS = 'Y'
Yellow if Time< 80 and Time > 24 --> This works
Green if Time <= 24 --> This works
You can do this with the conditional formatting, set the range to be applied to for the column you want highlighted, choose custom formula and add each one of these as it's own rule:
For orange:
=if(and(C:C>=80,B:B=""Y""),true,false)
and for red:
=if(and(C:C>=80,B:B=""N""),true,false)
Related
I am trying to write a query in google sheets that will affect conditional formatting. Below is my example dataset
A B C D E F G H I J
1 Signficance 1 0.5 -0.9 0.8 0.7 0.6 0.95 0.94 0.8
2 Number of Events 13 13 13 13 13 13 10 8 13
3 Lift 9 4 12 9 5 4 10 12 10
I want to fill in the following colors in the lift row with these rules:
If Signficance >= 0.9, then highlight corresponding Lift cell with Green
If Signficance >= 0.8 and Signficance < 0.9, then highlight corresponding Lift cell with Blue
If Signficance <= -0.9, then highlight corresponding Lift cell with Red
Any other significance, highlight corresponding Lift cell with Gray
The desired result will highlight the following cells as:
B3 = Green
C3 = Gray
D3 = Red
E3 = Blue
F3 = Gray
G3 = Gray
H3 = Green
I3 = Green
J3 = Blue
Here is my attempt which is time consuming for every cell:
4 rules:
Apply to Range for each: B3:3
Rule 1, Custom:
=B1<=-0.9
Red
Rule 2,Custom:
=B1>=0.9
Green
Rule 3,Custom:
=B1>=0.8
Blue
Rule 4, "Cell is not Empty"
Grey
It's important that the rules are in that order. As the order in which the rules are listed creates priority among the rules and allows you to keep them simpler.
Select the entire Row 3 by clicking on the 3 to the outside left of the grid.
Then you will apply four custom CF rules (i.e., each rule will have "Custom formula is..." selected under Format rules / Format cells if...). There are other ways to set up these rules, but I'm choosing this method for ease of explanation and process.
Apply the following CF rules in order:
1st / green rule
Enter the following formula in the field below "Custom formula is...":
=AND(ISNUMBER(A3),A1>=0.9)
Select a green background color and click "Done."
2nd / blue rule
Enter the following formula in the field below "Custom formula is...":
=AND(ISNUMBER(A3),A1>=0.8)
Select a blue background color and click "Done."
3rd / red rule
Enter the following formula in the field below "Custom formula is...":
=AND(ISNUMBER(A1),A1<=-0.9)
Select a red background color and click "Done."
4th / gray rule
Enter the following formula in the field below "Custom formula is...":
=ISNUMBER(A3)
Select a gray background color and click "Done."
It's important that the rules be in the above order, with green at the top and gray at the bottom of the CF rules stack.
I have a google sheet of values that vary across dates and I want to be able to highlight cells where the value drops/reduces by five or more compared to the previous value. The main issue I have is that there are also blank cells in the table so I am not sure how to ignore them.
Example of a table
jan1 jan2 jan3 jan4 jan5
A 60 72 50 80
B 40 32 60
C 80 88 90 75
I would want to highlight A-jan4, B-jan4, and C-jan5. Is there a way to do this with conditional formatting?
Try:
=ARRAYFORMULA((LOOKUP(2,1/ISNUMBER($A2:A2),$A2:A2))>LOOKUP(2,1/($B2:B2<>""),$B2:B2))
apply to range B2:F
use:
=INDEX((LOOKUP(2,1/ISNUMBER($A2:A2),$A2:A2-5))>=LOOKUP(2,1/($B2:B2<>""),$B2:B2))
I have this table and I want B1 and B2 to display the sum where D1, F1 and H1, and D2, F2 and H2 are bigger than 0, respectively. I will be inserting two columns to the left of C on a regular basis, and I don't want the column references in the formula to be updated when the columns are shifted, but if B2 becomes B3 when a row is added above it, I will need the formula to be updated for the row and check the values in D3, F3 and H3, or if I add rows below it, I want to be able to drag down and get the formula copied with incremental row values. I tried INDIRECT with and without &CELL("address", E2) but I couldn't get it to work as I wanted it.
A B (Sum) C D E F G H
1 Josh 3 Some number 6 Some number 4 Some number 3
2 Fiona 2 Some number 1 Some number 0 Some number 4
You can use OFFSET to get absolute column references, and COUNTIF to count if each referenced cell is bigger than 0:
=COUNTIF(OFFSET(B1,0,2),">0")+COUNTIF(OFFSET(B1,0,4),">0")+COUNTIF(OFFSET(B1,0,6),">0")
Not perfect, but try =SUM(OFFSET(B2,0,1,1,500)). That way you refer to the cell itself so whenever you add columns it's not affected. I used 500 arbitrarily since it's simple. Adjust as needed.
I am new to google sheets and am unaware of how to create a sequence of numbers in a column. I want to create a column with numbers from 0 to 1000 in increments of 10
Method 1 (formula)
Copy the following formula =(ROW()-1)*10
Select cells A1:A100
Paste the formula.
Method 2 (fill down series):
Write 0 on A1
Write 10 on A2
Write 20 on A3
Select A1:A3
Click on the bottom right corner of A3, then drag down until A100.
=ARRAYFORMULA({0; ROW(A1:A100)&0})
or:
=ARRAYFORMULA({0\ ROW(A1:A100)&0})
if you want real numbers then use:
=ARRAYFORMULA({0; VALUE(ROW(A1:A100)&0)})
or:
=ARRAYFORMULA({0\ VALUE(ROW(A1:A100)&0)})
I want to highlight the rows with the three lowest values in Column D if the value in Column A is 100. For example:
Column A D
30 2
**100 8**
50 20
**100 10**
100 50
**100 12**
Please try selecting A1:A6 and D1:D6 then Format, Conditional formatting..., Format cells if..., Custom formula is:
=and($A1=100,MATCH($D1,query($A$1:$D$6,"select D where A=100 order by D asc limit 3"),0))
choose formatting and click Done.