How to have Mixed References in Macros [Closed]

Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hi - Newbie here.. (can hear the groans already :-)

I am trying to use a macro to copy a set of cells.

I have successfuly created a macro - the problem is I would like the column reference to be absolute but the row reference to be relative. I can have one or the other but not mixed it seems.

If I have not explained myself well, perhaps this may help - I need to copy cells $J1:$S1 and paste them to $L1:$U1

Currently the macros works if the cursor is in cell J1 when I activate the macro but if I move the cursor to any other cell it copies and pastes the wrong set of cells.

Any help you can give is much appreciated.

Thanks

Chris

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Not know how your macro, but in general $ sign will make it absolute


$B1 says column B is fixed and row will change
B$1 says row is one and col will change
$b$1 is both fixed

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!