Conditional formating

lazarandreiflorin

New Member
Joined
Dec 16, 2018
Messages
34
Hello,

Is it possible to fill a row with different colors based on any cell from that row. For example I have row F3:R3 and if I type an "x" anywere in this row, I need the whole row to be red but after that if I type a number in another cell I want the row remain red. If I have numbers in all the cells in the row but in one of them is an X it should stay red. When I delete the X or replace it with a number I want the row to become green. If I delete everything in that row I want to have no fill at all. Hope you guys understand what I wrote. Sorry, english is my second language. Thank you
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
F3 to R3 for any X stay RED
then you can use a countif
=countif( $f$3:$r$3, "X")>0
that will be true for any X in that range and so we can use in conditional formatting for RED
=SUMPRODUCT(--(ISNUMBER($F$3:$R$3)))=13
Will count to see if all the row has a number in each cell

formulas if they return a zero or number will be counted as a number, otherwise should be ok

 
Upvote 0
I tested and I see it works but it`s not exactly what I was thinking. Maybe I did not explain it very good. If I have an X in any of the cells it needs to be red (the row). If I have X`s in all the cells then the whole row is red. If I have X`s and numbers in any of the cells (could be just a few cells not all) the row should still be red. If I replace the X`s with numbers and I will have let`s say 3 cells with numbers and the others empty then the row should be green. If delete every number and X it should be no fill at all.

Thank you very much for your help though.
 
Upvote 0
F3 to R3 for any X stay RED
then you can use a countif
=countif( $f$3:$r$3, "X")>0
that will be true for any X in that range and so we can use in conditional formatting for RED
=SUMPRODUCT(--(ISNUMBER($F$3:$R$3)))=13
Will count to see if all the row has a number in each cell

formulas if they return a zero or number will be counted as a number, otherwise should be ok

I mean the one for X ( row to be red ) works just fine.
The other rule for the row to become green only works if I have numbers in all the cells.
 
Upvote 0
You can do this with two Conditional Formatting conditions.
Select cell F3, and set normal formatting to no fill. The enter these conditions

1) =ISNUMBER(MATCH("X", $F3:$R3, 0)) makes it Red, stop if True
2) =(COUNT($F3:$R3)>0), makes it green, stop if True


Then copy that formatting to the other cells you want formatted that way. Note the relative row / absolute column referencing.
 
Upvote 0
You can do this with two Conditional Formatting conditions.
Select cell F3, and set normal formatting to no fill. The enter these conditions

1) =ISNUMBER(MATCH("X", $F3:$R3, 0)) makes it Red, stop if True
2) =(COUNT($F3:$R3)>0), makes it green, stop if True


Then copy that formatting to the other cells you want formatted that way. Note the relative row / absolute column referencing.

Yes this works but still having trouble with the formulas I already have in some of the cells. When I do not have X`s or numbers on that row it still remains green because of the formulas. Here is the attached file.

 
Upvote 0
=(COUNT($F$3:$W$3)>1)
counts cells that are not blank and formulas counted

what are you trying to count here , thats greater than 1
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top