JoshPocock
New Member
- Joined
- Apr 18, 2011
- Messages
- 3
I am placing Customers into Column A, and then they get a "ranking" in Column D.
Once these customers reach a certain criteria, they will get deleted from this sheet, and replaced with a new one (at a later time) manually. However, if their "ranking" in Column D is not rest to "1" when they are deleted, it causes problems elsewhere.
I have the following formula, but it just is not working. If I replace the "" with an actual value and test it, it works fine. I just cannot seem to get it to work if Column A is empty.
'Reset Potential to 1 for Unused Cells
Sheets("Prospect_Inputs").Select
Dim lngLastRow As Long
Dim i As Long
lngLastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lngLastRow
If ActiveSheet.Cells(i, "A").Value = "" Then ActiveSheet.Cells(i, "D").Value = "1"
Next i
Once these customers reach a certain criteria, they will get deleted from this sheet, and replaced with a new one (at a later time) manually. However, if their "ranking" in Column D is not rest to "1" when they are deleted, it causes problems elsewhere.
I have the following formula, but it just is not working. If I replace the "" with an actual value and test it, it works fine. I just cannot seem to get it to work if Column A is empty.
'Reset Potential to 1 for Unused Cells
Sheets("Prospect_Inputs").Select
Dim lngLastRow As Long
Dim i As Long
lngLastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lngLastRow
If ActiveSheet.Cells(i, "A").Value = "" Then ActiveSheet.Cells(i, "D").Value = "1"
Next i