InWonderland
New Member
- Joined
- Apr 17, 2013
- Messages
- 1
I am trying to write a nested if statement that if column W = "Correct" and column AA is empty then the blanks will colour in. I have tried a number of different ways and I'm hoping I'm getting close with the coding below. I am doing several checks on my worksheet that's why I need this to be in vba. Can anyone help?
[/FONT][/COLOR][/FONT][/COLOR]
Code:
[COLOR=#444444][FONT=Calibri] Dim I, j As Long
For I = 4 To NumberOfRows[/FONT][/COLOR][COLOR=#444444][FONT=Calibri] [/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] For j = 1 To 52[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] If j = 23 Then[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] If Range("W4").Value = "Correct" And Range("A4").Value Then[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] MsgBox "No entry for " & Cells(1, 27) & " on row " & I & " ", , "MissingData"[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] End If[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] End If[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri] [COLOR=#222222][FONT=Verdana]