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
 

Some videos you may like

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,767
Members
413,933
Latest member
Msar5586

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
Top