TuckerStevens
New Member
- Joined
- Jul 23, 2015
- Messages
- 2
Hello, I'm new to macros - any help appreciated - I'm sure its quite simple.
My code:
Sub NameClear2()
If Range("M8") = 0 Then
Range("B8") = 0
Else
Range("B8") = Range("B8")
End If
End Sub
I want this same function to apply to M9:M200, keeping B9 with M9 and so on respectively until B200 with M200. I think I just need a loop, but don't know how to write it?
Thanks!
My code:
Sub NameClear2()
If Range("M8") = 0 Then
Range("B8") = 0
Else
Range("B8") = Range("B8")
End If
End Sub
I want this same function to apply to M9:M200, keeping B9 with M9 and so on respectively until B200 with M200. I think I just need a loop, but don't know how to write it?
Thanks!