I am trying to build a short program that affects a specific number to a column. This number should be determined following a comparison - I want to compare the values of another column with fixed ones - and a loop should repeat this process for the entire column.
I already wrote some lines below, and I cannot find which ones are not correct. Any help would be much appreciated!
Sub comparison()
Dim Cell As Range
For Each Cell In Range("I2", Range("I2").End(xlDown))
If Cell > 3000000 Then
Cell.Offset(, -2).Value = 75
ElseIf 1000000 < Cell < 3000000 Then
Cell.Offset(, -2).Value = 100
ElseIf 100000 < Cell < 1000000 Then
Cell.Offset(, -2).Value = 200
ElseIf Cell < 100000 Then
Cell.Offset(, -2).Value = 300
End If
Next Cell
End Sub