Named Range Reference

Tropez

New Member
Joined
Apr 19, 2004
Messages
35
Greetings all, first off thank you to all the GREAT advice everyone adds to this Message Board as it has definately helped me out!

Now for my question, is there a way to reference a named range from another cell?

I have one sheet that has survey results and the corresponding question number as a named range (Q_1, Q_2, Q_3, and so on).

I have a second sheet that summarizes the results of from that table so they are easy to read, and I am referencing those named ranges in this formula:

Code:
=SUMPRODUCT((Q_2)*(Sales_ID=G1))

Cell A1 of the summary sheet has the number of a question that could also be used as the named range (Q_2). Is it possible to do something similar to this?

Code:
=SUMPRODUCT((CONCATENATE("Q_",A1))*(Sales_ID=G1))

Doing this allows the viewer to change the question reference to be any of the questions on the fly.

Thanks in advance!
Ken[/b]
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Tropez said:
Greetings all, first off thank you to all the GREAT advice everyone adds to this Message Board as it has definately helped me out!

Now for my question, is there a way to reference a named range from another cell?

I have one sheet that has survey results and the corresponding question number as a named range (Q_1, Q_2, Q_3, and so on).

I have a second sheet that summarizes the results of from that table so they are easy to read, and I am referencing those named ranges in this formula:

Code:
=SUMPRODUCT((Q_2)*(Sales_ID=G1))

Cell A1 of the summary sheet has the number of a question that could also be used as the named range (Q_2). Is it possible to do something similar to this?

Code:
=SUMPRODUCT((CONCATENATE("Q_",A1))*(Sales_ID=G1))

Doing this allows the viewer to change the question reference to be any of the questions on the fly.

Thanks in advance!
Ken[/b]

Replace

=SUMPRODUCT((Q_2)*(Sales_ID=G1))

with:

=SUMIF(Sales_ID,G1,Q_2)

And try:

=SUMIF(Sales_ID,G1,INDIRECT("Q_"&A1))
 
Upvote 0
That would work fine, except I just realized that I have a second formula that looks for those items >=4.

Code:
=SUMPRODUCT((Q_2>=4)*(Sales_ID=G5))

Thanks!
 
Upvote 0
Tropez said:
That would work fine, except I just realized that I have a second formula that looks for those items >=4.

Code:
=SUMPRODUCT((Q_2>=4)*(Sales_ID=G5))

Thanks!

The previous formulas should still be done with SumIf though.
 
Upvote 0
I added the indirect statement to the sumproduct formula and it works perfectly!

Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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