Conditional Formatting issue

DanMastro

New Member
Joined
Nov 29, 2012
Messages
3
I'm trying to highlight a row (columns 1-5) in a color based on two criteria:

1. The cell in column 1 of the previous row must not be blank.
2. The cell in column 5 of the current row must be blank.

Here is what I have put in as a formula:

=AND(NOT(ISBLANK(OFFSET(INDIRECT("R"&ROW()&"C"&"1",FALSE),-1,0))),ISBLANK(INDIRECT("R"&ROW()&"C"&"5",FALSE)))

When I plug this into a cell, it returns TRUE or FALSE as it should. I've tested it multiple times and it's fine, but no cells ever get highlighted.

Somebody please help!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I should clarify by saying that when I plug the formula into a cell, it works, but when I put it into the conditional formatting box, it doesn't.
 
Upvote 0
I figured it out myself! If anyone else experiences issues with this, fix it by removing the "Row()" items. The INDIRECT function works if you just omit the numbers using the R1C1 approach. Example:

INDIRECT("RC1", FALSE) - will return the cell in row 1, column 1
INDIRECT("RC5", FALSE) - will return the cell in row 1, column 5
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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