Hell why am I getting code error (1004) on this code/ Highlighted in red.
Code:
' Get the last row with text
Dim LastRow As Long
Dim i As Long
LastRow = Cells(Rows.count, 34).End(xlUp).row
' Use LastRow in loop
For i = 3 To LastRow
' Check if cell has text name
[COLOR=#ff0000] If Cells(i, 34).value = name And Cells.Offset(i, 1).value = Date And Cells.Offset(i, 1).value = Null Then[/COLOR]
' If Cells.Offset(i, 3).value = "" Then
MsgBox Cells(i, 34).value
MsgBox "OK"
End If
MsgBox i
' End If
Next i
' Print total
Debug.Print "Name not found"
Last edited: