VBAIntermediate
New Member
- Joined
- May 8, 2018
- Messages
- 10
Hi All,
I have a macro that uses cell references from Column B, it uses a lot of cell references in Column B. Is it possible for me to set it up a macro or adjust it, so I could re-use that code for columns B, C, D ect keep the row references. Below is a hugely simplified version of what I coded. Problem is there are like 50 rows and I just need to have the macros repeat but using the column references from column C and D and E ect - I hope that makes sense
<tbody>
</tbody>
What I have, for example, is (ignore the blatant syntax issues)
Sub AgemultipliedByMadeupNumbers ()
Range("B2").Value =x
x*54654654 = y
End Sub
Is there a way for me to reuse that code but for column C and D, without copying and pasting it all, because my code is really long.
I have a macro that uses cell references from Column B, it uses a lot of cell references in Column B. Is it possible for me to set it up a macro or adjust it, so I could re-use that code for columns B, C, D ect keep the row references. Below is a hugely simplified version of what I coded. Problem is there are like 50 rows and I just need to have the macros repeat but using the column references from column C and D and E ect - I hope that makes sense
A | B | C | D | |
1 | NAME | John | ||
2 | AGE | 32 | ||
3 | HEIGHT | 6ft | ||
4 | WEIGHT | 140 | ||
<tbody>
</tbody>
What I have, for example, is (ignore the blatant syntax issues)
Sub AgemultipliedByMadeupNumbers ()
Range("B2").Value =x
x*54654654 = y
End Sub
Is there a way for me to reuse that code but for column C and D, without copying and pasting it all, because my code is really long.