nirvehex
09-03-2014, 11:27 AM
Hi,
I'm trying to use this code:
Sub CleanExport()
For Each r In Range("Y2:Y" & Cells(Row.Count, "Y").End(xlUp).Row)
If r.Offset(0, -1).Value = "TOT" Then
r.Value = r.Value * 0.00495113169
End If
Next r
End Sub
to do the following:
I want the code to look at each numerical value in column Y and overwrite a new value if its corresponding row in column X reads "TOT". The new value will be what's currently in column Y * .00495113169.
My code keeps erroring out. Any ideas?
Thanks!
I'm trying to use this code:
Sub CleanExport()
For Each r In Range("Y2:Y" & Cells(Row.Count, "Y").End(xlUp).Row)
If r.Offset(0, -1).Value = "TOT" Then
r.Value = r.Value * 0.00495113169
End If
Next r
End Sub
to do the following:
I want the code to look at each numerical value in column Y and overwrite a new value if its corresponding row in column X reads "TOT". The new value will be what's currently in column Y * .00495113169.
My code keeps erroring out. Any ideas?
Thanks!