Need to fill a colour into the cells individually, if condition gets OK. Each cell with reference of different cell.
Means
if value of C1 is not between A1 & B1, C1 fills with red,
likewise,
if value of C2 is not between A2 & B2, C2 fills with red
if value of C3 is not between A3 & B3, C3 fills with red..
In Excel, the Conditional Formatting can do this
Select the range of cells, and click Home > Conditional Formatting > New Rule.
Then in the New Formatting Rule dialog, select Use a formula to determine which cells to format in the Select a Rule Type list, and type this formula =OR(C1<A1,C1>B1) into the Format values where this formula is true textbox, and click Format button to enable the Format Cells dialog, under Fill tab, and select one color you want to use for highlighting. See screen-print
Click OK > OK. Then the cells which are not in the number range have been highlighted
Cell C19 in a sheet looks up a certain word in cell B3
Cell C19 also checks whether there is a Yes in another sheet according to criteria in B3 in relative column 140 in that other sheet. If this is the case, it writes Yes in the cell, otherwise it writes Not reported (the formula: =IF(VLOOKUP($B$3,'some_sheet-1'!$B$5:$ATN$217,140)="","Not reported",IF(VLOOKUP($B$3,'some_sheet-1'!$B$5:$ATN$217,140)=0,"Not reported",(VLOOKUP($B$3,'some_sheet-1'!$B$5:$ATN$217,140)))))
Cell B20 then checks if there is a Yes in cell C19
If this is the case, cell B20 will lookup what is in cell B3and match de word to the line of another sheet (some_sheet-2), and if the result is a Yes in that cell, it will print out the header of the corresponding result.
If it does encounters a No, it will go to the next designated column and look for a Yes and so on until it finds one, if not it will write Not applicable or no data submitted
The formula in cell B20:
=IF($C$19="Yes",IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,7)="Yes",'some_sheet-2'!$H$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,11)="Yes",'some_sheet-2'!$l$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,15)="Yes",'some_sheet-2'!$P$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,19)="Yes",'some_sheet-2'!$T$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,23)="Yes",'some_sheet-2'!$X$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,27)="Yes",'some_sheet-2'!$AB$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,31)="Yes",'some_sheet-2'!$AF$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,35)="Yes",'some_sheet-2'!$AJ$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,39)="Yes",'some_sheet-2'!$AN$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,43)="Yes",'some_sheet-2'!$AR$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,47)="Yes",'some_sheet-2'!$AV$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,51)="Yes",'some_sheet-2'!$AZ$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,55)="Yes",'some_sheet-2'!$BF$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,59)="Yes",'some_sheet-2'!$BH$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,63)="Yes",'some_sheet-2'!$BL$4,""))))))))))))))),"Not applicable or no data submitted")
That was the easy part…
Now, what I need is that cell B21 does (almost) the same as the formula in cell B20. The twist is that it should 'take off' where cell B20 left.
What cell B21 should do:
Check if cell B20 contains the words Not applicable or no data submitted
If this is the case, stop there (leave the cell blank)
If it contains one of the column titles of some_sheet-2, go to the next column and do what cell B20 was doing…
Then what cell B21 does could be repeated over and over…
I realised that in order for cell B21 to find out where to begin, this should be defined. I therefore created a formula in cell A20 that looks up what appears in cell B20 and finds the address of that cell in some_sheet-2:
=CELL("address",INDEX('some_sheet-2'!$H$4:$BL$4,MATCH(B20,'some_sheet-2'!$H$4:$BL$4,0)))
Does anyone have an idea what formula to write in order to realise the above mentioned (without resorting to VBA)?
I am trying to conditionally format a cell to indicate if that cell = Y and an adjacent cell = EMAIL or TEXT, highlight the original cell. Is this possible?
My example starts in cell A1. Using formula
=AND($A1="Y",OR($B1="Email",$B1="Text"))
I've then applied this to range =$A$1:$B$4 which with a Red fill gives me:
I just want to know how to autofill all cell if I select value from 1 cell using drop down box. Suppose in 1st cell of the row I will select "Yes", then all the 5 adjacent cell of that row will also show "Yes". ther is data validation activated in all cell, but i dont need to select it each time.
If the dropdown is in A1 then just make B1 be:
=A1
so it shows whatever is in cell A1
I want to change the color of the text inside a cell but in a way that is conditioned by an action in another cell, specifically insertion of X. For example:
BEFORE
Cell A1: without text
Cell B1: text in red
ACTION: X is inserted in cell A1
AFTER
Cell A1: `X`
Cell B1: text in blue
Can this be done using conditional formatting or with a macro?
Please try a Conditional Formatting rule of:
=A1="X"
with Applies to:
=$B$1
and blue font. (This will override a 'standard' formatting of red font for B1 when A1 is populated with X.)
Yes it can.
If Range("A1") = "" Then
Range("B1").Font.Color = vbRed
else
Range("B1").Font.Color = vbBlue
End If
if its purely for the "x" change the 'else' line to this
ElseIf Range("A1") = "X"