Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 184
Default Macro changing region names

Hi,

I have a workbook with multiple tabs. All tabs have a defined names region.
For example if a tab is named 401 there is a name in the tab for 401 =
A1:P400. I would like to change the region selection all at once so it will
change to 401= A1:Z400. I would like to use a macro to change regions for all
the tabs rather doing this manually one by one. Your help is truly appreciate
it.

Thanks in advance

Nikki
by one.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Macro changing region names

No need for a macro, this is relatively easy to change.

First, go to Insert - Name - Paste. Choose to "Paste List".

Second, select the cells containing the formulas, and do a find & replace to
change P400 to Z400.

Finally, select the group of cells with names and formulas, and goto Insert
- Name - Create. Define Name labels as left column. Replace old name
definitions.


If this is something that you would need to do often, you could record this
as a macro, I suppose.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Nikki" wrote:

Hi,

I have a workbook with multiple tabs. All tabs have a defined names region.
For example if a tab is named 401 there is a name in the tab for 401 =
A1:P400. I would like to change the region selection all at once so it will
change to 401= A1:Z400. I would like to use a macro to change regions for all
the tabs rather doing this manually one by one. Your help is truly appreciate
it.

Thanks in advance

Nikki
by one.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Macro changing region names

Nikki,

Try this macro

Sub Resize_Ranges()
For x = 1 To Worksheets.Count
Set Rng = Range(Sheets(x).Name)
Rng.Resize(Rng.Rows.Count, 26).Name = Sheets(x).Name
Next
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Nikki" wrote:

Hi,

I have a workbook with multiple tabs. All tabs have a defined names region.
For example if a tab is named 401 there is a name in the tab for 401 =
A1:P400. I would like to change the region selection all at once so it will
change to 401= A1:Z400. I would like to use a macro to change regions for all
the tabs rather doing this manually one by one. Your help is truly appreciate
it.

Thanks in advance

Nikki
by one.

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
Paste values all cells in a region which refers to out of region Vijay Excel Worksheet Functions 0 August 25th 09 06:03 AM
how to find used region with macro Oerjan New Users to Excel 3 December 12th 08 09:36 AM
Changing worksheet names Carolyn Excel Worksheet Functions 1 November 10th 06 05:21 AM
changing file names saybut Excel Discussion (Misc queries) 2 February 20th 06 03:49 PM
Error opening a CSV from Web Browser after changing Region [email protected] Excel Discussion (Misc queries) 0 December 7th 05 08:09 PM


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