Referencing a named range based upon Range name entry in cell

B

Barb Reinhardt

Let's say I have cell Sheet1!A1 with the value of BPQ in it.
Let's also say that I have a named range with the name BPQ.

I'd like to reference that named range by referencing Sheet1!A1 somehow and
use it in a SUMPRODUCt statement. How would I reference the range?

Thanks in advance,
Barb Reinhardt
 
B

Bob Phillips

INDIRECT(Sheet1!A1)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

Barb Reinhardt

I should probably also say that BPQ is a workbook range, not a worksheet
range.
 
D

Duke Carey

This works for me:

=SUMPRODUCT(--(INDIRECT(Sheet1!D1)>5))

as long as the range name is global. If it gets changed so it is local to
Sheet1, it returns the #REF error
 
B

Barb Reinhardt

For this, the named range is functionally on Sheet2 and the cell with the
name is in Sheet1. Is that my problem?
 
P

Peo Sjoblom

Yes it is, you need somehow refer to the sheet then

=SUMPRODUCT(--(INDIRECT("'Sheet2'!"&A1)>1))
 
B

Barb Reinhardt

My named range is also a dynamic named range. Its defined with offset from
another dynamic named range.
 
B

Barb Reinhardt

Even if I have the range name defined as a workbook range I need to do that?
I've not had to reference workbook range names with the sheet names before.
 
B

Barb Reinhardt

Well, I've discovered the problem. When I hard code a test named range such
as "=Sheet1!B2:B10" it works, but when I use a dynamic range defined based on
OFFSET, it doesn't. Does anyone have any suggestion as to how I can address
this. I'm thinking I'll need a UDF.

Thanks,
Barb
 
D

Duke Carey

Use Tools->Fomula auditing->Evaluate Formula to find out which range name
fails, and where
 
B

Bob Phillips

How abut incorporating the offset formula in the SP

=SUMPRODUCT(--(OFFSET(Sheet2!A1,,,COUNTA(Sheet2!A:A),1)>1))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top