Name Data Column To First Row in Column

Mean_Mode

New Member
Joined
Sep 22, 2014
Messages
1
Hey,

I'm trying to name three workbooks worth of data to the varaible that is in the first row of each column. The data deminsions can change, rows and in number of colums columns so I can't hardcode that.

I'm pretty new to Excel VBA so any help would be much appreciated. Data attached is an example of what I am trying to do the first row {Pizza, Tacos, Pasta, Burgers} would be the new named ranges. The Pizza range would countain {sauce, meat cheese}

Thanks!


Pizza
Tacos
Pasta
Burgers
Sauce
Beef
Sauce
Cheese
Meat
Cheese
cheese
Onion
Cheese
Pickles

<TBODY>
</TBODY>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
.
.

Follow these steps:

(1) Select cells A1:D4 (i.e. from Pizza to Pickles);
(2) Execute a Go To Special:

Home --> Editing --> Find & Select --> Go To Special;

(3) In the Go To Special dialog box, choose Constants (Text) and click OK;
(4) Execute a Create Names from Selection:

Formulas --> Defined Names --> Create from Selection;

(5) In the Create Names from Selection dialog box, choose Top row and click OK.
 
Upvote 0

Forum statistics

Threads
1,221,444
Messages
6,159,912
Members
451,601
Latest member
terrynelson55

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