I
iashorty
I have written a Do Loop to change column s when either an Add or Remove have
been added in column Z during a review process. I wanted to write the "IF"
statement to include any form of Upper/Lower case combination of Add or
Remove. i.e. ADD or rEmove. Is this possible or should I add a column to
format the text into proper case in order for the Do Loop to work?
Here is my Do Loop:
Sub AddRemoveRows()
Range("S9").Select
x = ActiveCell.Row
Do While Cells(x, 19).Value > 0
If (Cells(x, 26).Text = "add") Then
Cells(x, 19).FormulaR1C1 = "2": x = x + 1
ElseIf (Cells(x, 26).Text = "Remove") Then
Cells(x, 19).FormulaR1C1 = "1": x = x + 1
ElseIf (Cells(x, 26).Text = "") Then x = x + 1
Else
MsgBox "Error in Add/Remove Column. Correct and rerun Save and
Print for Review."
End If
Loop
End Sub
been added in column Z during a review process. I wanted to write the "IF"
statement to include any form of Upper/Lower case combination of Add or
Remove. i.e. ADD or rEmove. Is this possible or should I add a column to
format the text into proper case in order for the Do Loop to work?
Here is my Do Loop:
Sub AddRemoveRows()
Range("S9").Select
x = ActiveCell.Row
Do While Cells(x, 19).Value > 0
If (Cells(x, 26).Text = "add") Then
Cells(x, 19).FormulaR1C1 = "2": x = x + 1
ElseIf (Cells(x, 26).Text = "Remove") Then
Cells(x, 19).FormulaR1C1 = "1": x = x + 1
ElseIf (Cells(x, 26).Text = "") Then x = x + 1
Else
MsgBox "Error in Add/Remove Column. Correct and rerun Save and
Print for Review."
End If
Loop
End Sub