简体   繁体   中英

Excel conditional formatting to highlight row different colours depending on content of cells within two ranges

I have a spreadsheet with columns A–AR populated. If cell range H, J and L, and cell range U, Z, AE and AJ each contain only one populated cell, the whole row should be highlighted green. If the two ranges contain fewer than one populated cell in each range, then the row should be highlighted orange. If neither of these conditions are met, eg all the cells are populated, no formatting should be applied.

Any help with this greatly appreciated!

You can use COUNTBLANK() to check if cell is blank or LEN() to see if length is 0. So highlight the row then once in the new rule dialogue, choose fill colour and in the formula add something like:

=AND(COUNTBLANK(H1), COUNTBLANK(J1), COUNTBLANK(L1))

This would make the row red if all of these three cells are empty.

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