countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 758
Hello friends,
I have a sheet with data, I want the below macro to go thru all the cells of column AF. If it finds 0.00 in the cells of AF, then I want the entire row to be highlighted (selected).
Please help me fill the question marks in the below code. And see if please see if I missed anything in the code.
Thanks,
Nawaf
I have a sheet with data, I want the below macro to go thru all the cells of column AF. If it finds 0.00 in the cells of AF, then I want the entire row to be highlighted (selected).
Please help me fill the question marks in the below code. And see if please see if I missed anything in the code.
Thanks,
Nawaf
Rich (BB code):
Sub Macro1()
Dim Curr_Cell As Long
Dim Prev_Cell As Long
Dim i As Long
Dim Loop_Count As Long
ActiveWindow.Activate
Loop_Count = Range(Selection, Selection.End(xlDown)).Count
'MsgBox Loop_Count
For i = 2 To Loop_Count
Range("AF" & i).Select
Curr_Cell = ActiveWindow.ActiveCell
'MsgBox Curr_Cell
If (Curr_Cell <> Prev_Cell) Then
??????
End If
Prev_Cell = Curr_Cell
Next i
End Sub