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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,025
Messages
5,856,894
Members
431,837
Latest member
megantang

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