LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default The Relative Macro

I know how to create a relative macro...to a point. I know that when I start
recording the macro, I have to pick the RELATIVE button in the little toolbar.
I will tell you what I want to accomplish and then what happens.

1. I have a cell (A1) that has a city, state, & zip code (Pittsburgh, PA
15212).
2. Cell B1 is empty and already formatted for text.
3. I place the cursor in cell A1 and start to record the macro.
4. I press the relative button.
5. I double click in A1, hold the shift key down and use the arrow keys to
highlight the zip code and the space in front of it. (6 arrow keystrokes to
the left)
6. When highlighted, I press Ctrl-X to cut the space and zip code and copy
it to the clipboard.
7. I hit <Enter and the cursor moves down to the next cell. (A2)
8. I use the arrow keys to move the cursor back up and to the right cell (B1).
9. I press Ctrl-V to paste the zip code into B1 and hit <Enter which moves
the cursor down to B2.
10. I use the arrow keys to move the cursor over to cell A2.
11. I then stop recording the macro.

You can see that I want to strip the zip codes out of one cell and put it
into another.
Here's is what happens. The macro runs great as far as the movement and the
cutting of the zip codes. But, when it moves to the next cell, it always
pastes the same number...the one that was originally cut and copied in the
original cell.

What am I doing wrong? Does it have something to do with the relative vs
actual?

Please help,
--
Dan P.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Relative reference? in macro TRYING Excel Worksheet Functions 3 November 20th 07 12:00 AM
How to macro to relative position jk9533 Excel Discussion (Misc queries) 6 October 15th 07 08:11 PM
relative value in macro Janett Excel Discussion (Misc queries) 2 April 4th 06 05:42 PM
macro vba relative references aut1jlt Excel Worksheet Functions 0 April 20th 05 06:13 PM
macro relative referencing harriet Excel Discussion (Misc queries) 5 February 15th 05 01:40 PM


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"