Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create a Macro with Starting Cell as a Variable

I want to create a macro with the starting cell as a
variable, not a fixed value.
I want the macro to:

1. Start in a cell location (this cell changes with each
run).
2. Go to a named range.
3. Copy the named range.
4. Return to the starting cell.
5. Paste the named range.

I have not been successful at making the starting cell a
variable.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Create a Macro with Starting Cell as a Variable

Hi Linda

Try this to copy the range to the activecell

Range("named range").Copy ActiveCell


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Linda M." wrote in message ...
I want to create a macro with the starting cell as a
variable, not a fixed value.
I want the macro to:

1. Start in a cell location (this cell changes with each
run).
2. Go to a named range.
3. Copy the named range.
4. Return to the starting cell.
5. Paste the named range.

I have not been successful at making the starting cell a
variable.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Create a Macro with Starting Cell as a Variable

Linda M. wrote:
I want to create a macro with the starting cell as a
variable, not a fixed value.
I want the macro to:

1. Start in a cell location (this cell changes with each
run).
2. Go to a named range.
3. Copy the named range.
4. Return to the starting cell.
5. Paste the named range.

I have not been successful at making the starting cell a
variable.


Try this

Sub CopyNamedRange()
Range("RangeNameHere").Copy ActiveCell
End Sub

--
Regards,

Juan Pablo González


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
Transpose? Offset? Variable starting cell Fin Analyst Excel Discussion (Misc queries) 4 April 26th 06 07:48 AM
Macro - Return to starting cell sony654 Excel Worksheet Functions 8 February 26th 06 08:55 PM
Returning Macro to Starting Cell sony654 Excel Worksheet Functions 3 February 25th 06 12:02 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Discussion (Misc queries) 1 March 9th 05 11:41 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM


All times are GMT +1. The time now is 11:34 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"