简体   繁体   中英

Excel Conditional Formatting - end cell colour based on value within a row of cells

Just looking for some help, i'm new to this whole world.

I'm trying to create a spreadsheet that has 6 columns each with a value of 1-3. If the value is 3 then the end "Warning" cell should be the colour green, if the value were 2 or 1 then the end cell should show as amber.

I know some basic VBA but I keep finding help based on Conditional Formatting - which is normally great. However, I cant seem to get it to do the above without putting a conditional format on for each variable on each cell. If I only had one row it would be ok, but I have 65 -I think Id go crazy before finishing that.

If there was any way for me to be able to select the entire row using CF and change the end cell colour based on the variables in that row then that would be great.

I hope this makes sense, any help someone could give would be fantastic.

Thanks!

  1. Select the "Warning" column with focus on the first cell.
  2. Open the "Conditional formatting" and choose "New Rule"
  3. Select "Use a formula to determine which cells to format"
  4. Use an =OR(ref1=3,ref2=3,...) formula to test the values of other columns (or some more complicated formula if you want*) and set the corresponding formatting
  5. Validate
  6. Repeat for other formatting

* =SUMPRODUCT(--(C1:F1=3))>0 for example will set the formatting if any cell in C1:F1 is 3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM