Regarding naming ranges....

Phil Smith

Active Member
Joined
Aug 13, 2004
Messages
285
Office Version
  1. 365
Platform
  1. Mobile
Hi People of the Forum,

First of all, this is more of a "I wonder if..." question rather than a I REALLY need this to be solved situation.

Anyway, I have a table in which I need to name each row as a range, not a problem, I use:
Code:
For r= 2 to 71

    .Cells(r,2).Resize(1,28).Name="Week"&r-1

Next r
Is it possible to name each row in one batch? I was probably thinking along the lines of SpecialCells to act on all cells matching a given criteria (I think) and just wondered if it was possible to create/name multiple ranges in one go.

Probably not, but if you don't ask...

Thanks! :-)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi

You can if you have the names of the named ranges at one of the borders of the table.

For ex. in the case you posted, if you have the names in column A, like A2="Week1", A3="Week2", etc, you can use:

Code:
    Range("A2").Resize(70, 28).CreateNames Left:=True
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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