Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 20
Default Saving a range for later reference

I need a macro that will save a range as "VariablesFor" & Job, where Job = Range("F1").Value, as well as save Job xlDown column A. The ranges need to be on the same page, but need to not replace any pre existing data. What I have so far is:
Sub SavingSet()
'
' SavingSet Macro
'
NewJob = Range("G1").Value
'
Range("A2:O33").Select
Selection.Copy
Sheets("VariablesQS").Select
ActiveWindow.SmallScroll Down:=12
Range("B1").End(xlDown).Offset(-1).Select
ActiveSheet.Paste
Selection.Names.Add Name:="VariablesFor" & NewJob
Sheets("Variables").Select
Range("G1").Select
Selection.Copy
Sheets("VariablesQS").Select
Range("A1").End(xlDown).Select
ActiveSheet.Paste
End Sub

However, The First .end(xlDown) doesn't bring it down nearly far enough, or it will just bring it down to row one million something. Then it stops at the selection.Names.Add line, I don't know how to Tell it to select the cells it pasted any other way, since the fresh paste will still be a selection, I would like to do it by referring to that selection.

Any help would be great.
Thanks,
Pistolade

Last edited by Pistolade : March 25th 14 at 12:25 AM Reason: Wrong information
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
invalid reference error saving 2003 file in 2007 Gary C Excel Discussion (Misc queries) 0 December 8th 09 02:58 PM
Saving data from a cell reference [email protected] Excel Discussion (Misc queries) 0 July 10th 08 03:33 AM
Getting and Saving a Cell Reference Marco Excel Programming 4 June 7th 07 10:56 PM
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
How do I save Excel info without saving the reference cells? Dave Excel Discussion (Misc queries) 2 July 9th 06 09:38 PM


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