Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
sony654
 
Posts: n/a
Default Getting macro to copy to starting cell

Help. I am building a macro that always references the same worksheet totals
and should copy the result back to the starting cell (which changes each time
the macro is run). I can get it to work but the result always returns to
same range of cells which is not the objective. I always want the result to
return to the starting point.

See Below: when the curser starts under 1/06, the total copys there. When
the curser starts under 1/07, the macro should return under 1/07 and copy
there. But when I run the macro it always returns under 1/06.

totals 1/06 1/07 1/08
3.00 3.00 ***
7.00 7.00
6.00 6.00 *** New total should copy under 1/07
4.00 4.00
20.00 20.00

How do I get the macro to return the result to the starting point?

Thanks for your help


--
Sony Luvy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
davemorrison
 
Posts: n/a
Default Getting macro to copy to starting cell

record your macro in relative mode at the beggining,

you can change from relative to absolute any time when you are
recording a macro,

so... start recording, then press the relative button, if you want to
go to the beggining of a column click a cell in the column and hit
shift up,(if you want to select two from the beggining select shift up
and then down 2, if you want to find the first empty space in a column
select a cell in the column press shift down and then down one),

when you record in absolute mode the actual cell you selected in the
macro will be selected always, relative mode selects the cell in the
action

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
damorrison
 
Posts: n/a
Default Getting macro to copy to starting cell

check your macro, change your paste cell to the correct range.
couldn't you just reference the cell eg: =G7 or do you need that
number to to be absolute?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
sony654
 
Posts: n/a
Default Getting macro to copy to starting cell

Dave, I am going to launch the macro from a different cell address each time
it runs. I want the macro execution to always complete in the starting cell
(return to it). Thanks - Tom
--
Sony Luvy


"damorrison" wrote:

check your macro, change your paste cell to the correct range.
couldn't you just reference the cell eg: =G7 or do you need that
number to to be absolute?


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
How to Copy the value of a cell to any given cell Memphis Excel Discussion (Misc queries) 4 October 21st 05 08:29 PM
in cell editing macro ynissel Excel Discussion (Misc queries) 2 July 27th 05 07:28 PM
How can I copy cell formats in functions? Twitty Kitty Excel Worksheet Functions 3 July 24th 05 12:26 AM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 12:30 AM.

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"