PC Review


Reply
Thread Tools Rate Thread

After Copy and Paste, Add to an Existing Named Range

 
 
Aria
Guest
Posts: n/a
 
      6th Mar 2007
Hi,
I have named a range and when I copy a group of rows (with this range
included), I would like to update the new section to include this name
in its range. For example:

Row 7 to 26 is the entire group. D7 to O19 is called InputRange. When
I copy and paste this group anywhere on the spreadsheet, say, Row 27
through to Row 46, I'd like the range of D27 to O39 to be included in
the InputRange name.

This is so that I could update the fonts and formats for everything
located within InputRange.

Thank-you for helping me.

Aria

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
David Adamson
Guest
Posts: n/a
 
      6th Mar 2007
If you just need to update the formats of the cells why just not use
pastespecial ?


<Aria> wrote in message news:(E-Mail Removed)...
> Hi,
> I have named a range and when I copy a group of rows (with this range
> included), I would like to update the new section to include this name
> in its range. For example:
>
> Row 7 to 26 is the entire group. D7 to O19 is called InputRange. When
> I copy and paste this group anywhere on the spreadsheet, say, Row 27
> through to Row 46, I'd like the range of D27 to O39 to be included in
> the InputRange name.
>
> This is so that I could update the fonts and formats for everything
> located within InputRange.
>
> Thank-you for helping me.
>
> Aria
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
Aria
Guest
Posts: n/a
 
      6th Mar 2007
I wanted to code to format the range automatically because the users may
not always paste as values when they copy and paste data into my range.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
David Adamson
Guest
Posts: n/a
 
      7th Mar 2007
Something like this will format an entire range into $

With Worksheets("capital")
.Range("b2948").NumberFormat = "$#,##0"
End With

<Aria> wrote in message news:(E-Mail Removed)...
>I wanted to code to format the range automatically because the users may
> not always paste as values when they copy and paste data into my range.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
Aria
Guest
Posts: n/a
 
      8th Mar 2007
Hi David,
I have a template already setup that consists of about 20 rows or so.
Within these rows, I have named a specific range called InputRange.

Is there a way that if I keep copying and pasting these 20 rows over and
over again throughout the spreadsheet, that I could add the range to the
InputRange name?

That way, I could select all cells that are called InputRange and do any
formatting required by code Before_Save?

Thanks,
Aria

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy named range & paste values J.W. Aldridge Microsoft Excel Programming 2 1st Mar 2010 09:59 PM
copy named range & paste J.W. Aldridge Microsoft Excel Programming 2 8th Oct 2009 04:38 PM
Named range row copy/paste problem John Microsoft Excel Programming 1 2nd Feb 2009 06:27 PM
Copy & Paste Named Range Contents BJ Microsoft Excel Programming 8 1st Aug 2008 07:18 PM
Copy and Paste 2 columns from a named range? Simon Lloyd Microsoft Excel Programming 2 28th May 2006 08:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 AM.