Range name AKA?

Locoguy

Board Regular
Joined
Jan 25, 2012
Messages
107
I'm having a mental moment... so I'm asking for assistance from "The Board"::pray:

I have a range (A2:A10) that has a range name of "Apple"... I want to refernce this same range of data, but with a different name... In this example "Orange" IS there a way in VBA code to add the range name "Orange" and have it define the same range as "Apple"? (ie Orange = Apple?)...

BTW... I need a vacation... :LOL:
Loco
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Why don't you simply do so by means of the Name Box on the Formula Bar,Formulas | Name Manager or Insert | Name | Define?
 
Upvote 0
OK... One last question... I have 2 columns Column A has the names I have already assigned in my macro, Column B has the "AKA" name that I want to add... Any suggestions how I can loop through column a and assign the column B names?

Loco
 
Upvote 0
What do you mean loop through column A, don't you want to loop through the values in Column B and assign those names to the range A2:A10. My other question is why are you doing this?
 
Upvote 0
The reason behind this is: I sometimes have data from 2 sensors in line with one another and my macro is built around this assumption. NOW, I'm having instances were I don't have one of the two sensors... Usually, the sensors have very similar readings, so inorder to keep things moving along, I'm naming the missing sensor data to the range of the data that I do have. I'm setting up a list of the names that I do have and a corrisponding list of the names that I would want to have the same data range. Just need a way to 1. look for one of the column names and 2. loop through the names and assign the corrisponding alias names (apple=orange).


Thanks !


Sincerely,


Loco
 
Upvote 0
So all the range names are in column B, and they all apply to range A2:A10?
 
Upvote 0
Correct, range names would be in A2:A10 and in B2:B10 would be the corrisponding alias name.

Thanks !


Loco
 
Upvote 0

Forum statistics

Threads
1,203,171
Messages
6,053,875
Members
444,692
Latest member
Queendom

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