Related:
- VBA code for a IF Function
- Battery reset code - Guide
- Samsung volume increase code - Guide
- Usa country code for whatsapp - Guide
- How to get whatsapp verification code online - Guide
- Cs 1.6 code - Guide
4 responses
I cant get the If function to do what I want. Everytime I put a range into the code, it comes up with a error. If I work with a single cell then the below works.
If Range("B2") = 3401 Then "ERROR ON THIS LINE WHEN I PUT A RANGE IN B2:B23"
Range("C2").Select
Selection.Copy
Range("D2").Select
ActiveSheet.Paste
Range("D2").Select
EndIf
If Range("B2") = 3401 Then "ERROR ON THIS LINE WHEN I PUT A RANGE IN B2:B23"
Range("C2").Select
Selection.Copy
Range("D2").Select
ActiveSheet.Paste
Range("D2").Select
EndIf
Hi
i need to add it as part of a macro that already exists. I just cant get it to work, thats why im asking.
i need to add it as part of a macro that already exists. I just cant get it to work, thats why im asking.
May 26, 2011 at 06:29 AM
i.e. where you are typing your macro give space, I mean tab
If Range("B2") = 3401 Then
Range("C2").Select
Selection.Copy
Range("D2").Select
ActiveSheet.Paste
Range("D2").Select
EndIf
this is working I checked myself