Multiple Tables with the same name?

lownote14

New Member
Joined
Apr 7, 2011
Messages
19
Ok this is just a hypothetical idea I came across when i was studying a VBA book.

So my first question would be, if in excel I were to name a range of cells, could I call that specific range of cells in VBA, by its name?

The next question would be, if I had a bunch of worksheets all with tables that are similar, differing in the amount of rows they contain, could I name them the same between each sheet, without confusing Excel...

I realized that sounds confusing so I'm going to try and use an example. Lets say I have three work sheets Greg, Todd, and Sam. In each worksheet they contain three tables that show three very similar content. Could I in work sheet GREG name a range of cells TABLE1, and then in Todd name another range of cells TABLE1 without the other table being destroyed or what have you.

OK if all those things are possible, does that mean that in VBA I could call the same table from different worksheets and thus get individual tables from the same or different sheets?

I hope this isn't too confusing. Thanks for any help provided.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
If Excel allows you to do it, then Excel - and VBA - will have a strategy for ensuring that they don't get confused.

So as Yard says, give it a go.
 
Upvote 0
Edit:
Sorry accidentally hit reply and not edit. Sorry for the double post.

For anyone who is looking for a similar answer I might have figured it out. When you name a range of cells it give you the option in a drop down to choose a couple of different things. I.E. workbook, worksheet1, worksheet2 etc...

I hope this helps anyone looking
 
Last edited:
Upvote 0
Edit:
Sorry accidentally hit reply and not edit. Sorry for the double post.

For anyone who is looking for a similar answer I might have figured it out. When you name a range of cells it give you the option in a drop down to choose a couple of different things. I.E. workbook, worksheet1, worksheet2 etc...

I hope this helps anyone looking
thanks a lot it really helped
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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