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!
 

DanMastro

New Member
Joined
Nov 29, 2012
Messages
3
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.
 

DanMastro

New Member
Joined
Nov 29, 2012
Messages
3
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
 

Forum statistics

Threads
1,081,834
Messages
5,361,594
Members
400,639
Latest member
fleyd

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top