Ok So you want to go through all the data in a column in your work sheet 

Dim iRows as Long
iRows = 45
For iRow = 3 To iRows

 
if you’re using any version of excel higher than ’97 – you need to use Long not Integer – or you will see failures in higher rows.
 
Here we are just going to check if colmn G is x and then set column I. You could achieve this with an if statment in column I.

If Sheets("Data").Range("G" & CStr(iRow)).Value = "x" Then
Sheets("Data").Range("I" & CStr(iRow)).Value =45
Else
Sheets("Data").Range("I" & CStr(iRow)).Value =52
End If
Next iRow

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s