Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default relative ref. macro

Recording macros can get you only so far, unfortunately...

Assume you want to copy the selected cell(s) five rows down. One way
is:

Public Sub Copy5RowsDown()
With Selection
.Copy Destination:=.Offset(5, 0)
End With
End Sub




In article ,
"Milton" wrote:

I want to copy several cells to new locations in the same
spreadsheet, using a macro in relative mode. When I
click on the Relative Reference Button on the Stop
Recording Toolbar the button shows as "relative" only as
long as the cursor is pointing to it. Then when I do the
copy/paste function only the first copy is relative and
all following copy/paste events are absolete. Also the
relative function works for only one cell, if several
cells are selected the copy is absolute mode even if the
relative reference button was pressed.
Any help will be appreciated.

Reply
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
The Relative Macro DanP Excel Discussion (Misc queries) 6 March 17th 09 02:58 PM
Macro using relative references warp9 Excel Worksheet Functions 5 October 21st 08 04:21 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 relative referencing harriet Excel Discussion (Misc queries) 5 February 15th 05 01:40 PM


All times are GMT +1. The time now is 06:08 PM.

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

About Us

"It's about Microsoft Excel"