Excel VBA column Null Color RED

I have a macro that copies sheet1 to sheet2.  

How would you say, after the macro finishes that

 "If column Z is null, then color column Z RED?"
ca1358Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
JPConnect With a Mentor IT DirectorCommented:
Try the attached code
Sub checkcolumnZ()
Dim lastrow As Long
lastrow = [z65536].End(xlUp).Row
If lastrow = 1 Then
    If Cells(lastrow, "Z").Value = "" Then
        Columns(26).Interior.ColorIndex = 3
        Else
        Columns(26).Interior.ColorIndex = 0
    End If
End If
End Sub

Open in new window

0
 
ca1358Author Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.