Hello,
I simply want to loop through rows in a set range. If Column 9 has an * and Column C has any kind of value, change the value to a 5. I can't get this to work. Am I doing the if statement wrong. Thank you.
Sub ConvertX()
StartRow = 42
EndRow = 68
ConvertibleCode = 9 ' column I
Rating5 = 3 'column C
UpdateCell = Critical_Skills.Cells(StartRow, Rating5)
ConvertCell = Critical_Skills.Cells(StartRow, ConvertibleCode)
Do Until StartRow = EndRow
If UpdateCell <> "" And ConvertCell = "*" Then
UpdateCell = "5" 'update cell if there is a value and *
End If
StartRow = StartRow + 1 ' increase row to search for non blank cells
If StartRow = EndRow Then Exit Do
Loop
End Sub
I simply want to loop through rows in a set range. If Column 9 has an * and Column C has any kind of value, change the value to a 5. I can't get this to work. Am I doing the if statement wrong. Thank you.
Sub ConvertX()
StartRow = 42
EndRow = 68
ConvertibleCode = 9 ' column I
Rating5 = 3 'column C
UpdateCell = Critical_Skills.Cells(StartRow, Rating5)
ConvertCell = Critical_Skills.Cells(StartRow, ConvertibleCode)
Do Until StartRow = EndRow
If UpdateCell <> "" And ConvertCell = "*" Then
UpdateCell = "5" 'update cell if there is a value and *
End If
StartRow = StartRow + 1 ' increase row to search for non blank cells
If StartRow = EndRow Then Exit Do
Loop
End Sub