How to have Mixed References in Macros

Closed
Chris - Feb 9, 2010 at 01:54 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 9, 2010 at 03:02 PM
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 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 9, 2010 at 03:02 PM
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
0