PDA

View Full Version : [SOLVED:] Conditional format macro



ADB123
07-19-2017, 06:17 PM
Hi Guys

I use the below macro to highlight the row if the cell in column 7 is blank. I would like to do the opposite and highlight it if it is not blank.



Dim i As Long
i = Sheets(4).Range("A" & Rows.Count).End(xlUp).Row
If Replace(WorksheetFunction.Clean(Sheets(4).Cells(i, 7).Value), " ", "") = "" _
Then Sheets(4).Range(Cells(i, "A"), Cells(i, "Z")).Interior.Color = vbYellow


Any assistance will be appreciated

mana
07-23-2017, 03:02 AM
>If ******* = "" Then ******.Color = vbYellow


If ******* <> "" Then ******.Color = vbYellow

mdmackillop
07-23-2017, 03:52 AM
Select the area and apply the conditional formatting formula rule =$Gx="" with your choice of highlight, where x is the first row of your selection

ADB123
07-25-2017, 03:02 PM
Hi Guys

I have attached the sample file.

On my macro called Sub Main2 I would like it to highlight the row if column 7 is not blank

Any help will be appreciated



Regards
Adriaan

ADB123
07-25-2017, 03:21 PM
Got it worked out

Thank you

Regards
Adriaan