
Originally Posted by
william516
*snip*
How about something like this:
Code:
Dim rows As Integer
Dim i As Integer
i = 1
Range("B1").Activate
rows = ActiveSheet.UsedRange.rows.Count
Application.ScreenUpdating = False
Do
'''Find requirements for Photo
If ActiveCell.Value = "Photo Detector" Or ActiveCell.Value = "PS" Or ActiveCell.Value = "PD" Then
ActiveCell.Value = "Photo"
ActiveCell.Offset(1, 0).Activate
'''Find requirements for Pull
ElseIf ActiveCell.Value = "Manual Station" Or ActiveCell.Value = "Pull Station" Or ActiveCell.Value = "Pull Box" Then
ActiveCell.Value = "Pull"
ActiveCell.Offset(1, 0).Activate
'''No requirements met, so move to next cell
Else
ActiveCell.Offset(1, 0).Activate
End If
i = i + 1
Loop Until i > rows
Range("B1").Activate
I'm still pretty new at this stuff myself. A more senior coder could probably come up with a better solution, but this should work.
Bookmarks