Excel Formula Using Defined Names

AlexaS

Board Regular
Joined
Oct 12, 2012
Messages
158
Ok, so I'm probably just not using the correct search terms (wouldn't be the first time), but I'm on a bit of a time-crunch with this one:

I have a list of numbers which match up to a defined cell name on a different sheet. I'm hoping to make the results variable.

For example what I currently have is:

[TABLE="class: grid, width: 500"]
<TBODY>[TR]
[TD]ID
[/TD]
[TD]Calculate %
[/TD]
[/TR]
[TR]
[TD]23
[/TD]
[TD]=_23_Calc
[/TD]
[/TR]
[TR]
[TD]156
[/TD]
[TD]=_156_Calc
[/TD]
[/TR]
</TBODY>[/TABLE]


23 and 156 are my ID numbers that the list is based on. The =_23_Calc is the defined cell name from the other sheets where the percentage is calculated. Is there anyway to have the cell pull the reference based on the value in the relevant ID cell?

I.E.

[TABLE="class: grid, width: 500"]
<TBODY>[TR]
[TD]ID
[/TD]
[TD]Calculate %
[/TD]
[/TR]
[TR]
[TD]23
[/TD]
[TD]=_&"A2"&_Calc
[/TD]
[/TR]
[TR]
[TD]156
[/TD]
[TD]=_&"A3"&_Calc
[/TD]
[/TR]
</TBODY>[/TABLE]

So that even if the list changes, we don't need to change the formulas as well. Is this possible? Am I just typing the formula wrong (because the above didn't like me)?

Thanks for any help you might be able to give :biggrin:
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
This sounds like a mess of a spreadsheet, but here's the formula you're looking for.

=indirect("_"&a2&"_Calc")

In the future, look into vlookup() or Index(match()) functions.
 
Upvote 0
I've never used indirect before. And you should have seen the spreadsheet before I got to it. Also - the calculation is based off of a list of values going down. From what I've struggled through with vlookup before, it wouldn't have worked for this.

Thank you both!
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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