LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Code to Reset Named Ranges when copy/paste to new file

Thank You Joel - Love Ya Work.
I'll now set about making all the necessary changes.
Here's hoping I don't need to continue the thread?
Cheers
VickiMc

"Joel" wrote:

I I'm copying into a template I would only have the named range the 1st
location of where the table is located and paste the table into the 1st
location of the named range. Yo can then get the end of the table using 1 of
the following methods

LastRow = Range("Start Table").end(xldown).row

or

LastRow = cells(Rows.Count),Range("Start Table").column).end(xlup).row

If you have any formulas that go at the end of the table of the template
then use Insert instead of paste to place the table.



"VickiMc" wrote:

Hello world,
My problem is that I am trying to replicate a (Payroll) Template that is
ultimately uploaded by that Dept as a DAT File for use with other Software.
I have copied all the Modules from the Template file so that for all intent
and (their) purposes the two files function the same, with the exception of
some of the named ranges. ('Some' being about 60).
There are three sections to the file (all on the one worksheet), one for
Hours Worked, below that is a section for Leave Taken, and below that one for
Allowances.
In my main Work File I copy & insert the three tables into a worksheet that
mimics the template (working from the bottom up), and then copy & paste the
whole lot into the replicate template, which is where it all starts to go
wrong.
Because I've copied & pasted into/onto the template I lose all the named
ranges.

So here's my question, is there 'Drop Dead' code for re-establishing the
named ranges once I've copied & Pasted onto the Replicate Template or should
I be creating them in my Work file prior to the pass?

NB: the three tables will vary in height (rows) every week.

 
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
Copy Worksheet with Named Ranges KC Rippstein hotmail com> Excel Programming 2 June 7th 08 06:04 AM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Copy and paste Named Ranges Robert H Excel Programming 6 February 6th 07 04:13 PM
Copy data in named ranges to a newer version of the same template to identical ranges handstand Excel Programming 0 August 21st 06 03:51 PM
Named ranges reset. rasputin Excel Worksheet Functions 5 December 11th 04 10:06 PM


All times are GMT +1. The time now is 01:55 AM.

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"