Excel Macro To Highlight Every Row Above Every Empty Row
I have an excel data sheet which is divided into data blocks of variable number of rows.
Data blocks are separated from each other with an empty row.
What I am in a dire need for is a macro that highlights the last row of each data block; which is the row above the empty row.
Can someone help me with this request please?
Thanks in advance
Hi Josef, Just use the
Hi Josef,
Just use the conditional formatting tool for this. Highlight your entire sheet, go to conditional formatting, enter a new rule & select use a formula to determine which cells to format.
next in the box for "format values where this formula is true" enter the below:
=if(and(counta(1:1)>0,counta(2:2)=0),1,0)
then click on Format, select the fill tab & choose your colour.
Regards
Mark