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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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,215,410
Messages
6,124,756
Members
449,187
Latest member
hermansoa

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