Identical Named Ranges on Multiple Sheets ... Possible?

Sandy Radjenovic

Board Regular
Joined
Nov 4, 2003
Messages
76
I have a workbook with seven identical worksheets (each holding a schedule for a particular machine). I have a macro that runs and reformats the columns. I would like to name the column ranges so that if a column is added or deleted, I do not have to rename the columns selected in formatcolumns(). Is it possible to do this? Can I have identical named ranges on all of the worksheets (i.e. column A = status, column B= job, etc.)? I have tried this and have noted that if I define a named ranged in worksheet 2 that I had already set in worksheet 1, worksheet 1's named range no longer exists. Is there some way to do this?

I'd really appreciate some insight.


Sub FormatColumns()

Application.ScreenUpdating = False

Range("status").Select
'Columns("A:A").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
.ColumnWidth = 11.5
End With

... commands exist after this code for rest of columns

End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi Sandy,

Yes, Excel allows you to do this.
In the Range Name Define box, preface the range with the WorkSheet name.
IE: =Project_Schedule!$A$1:$L$19
You will only be able to see the Named Range when the WorkSheet that it refers to is the current sheet.
Hope this helps.

John
 
Upvote 0

Forum statistics

Threads
1,214,962
Messages
6,122,482
Members
449,088
Latest member
Melvetica

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top