Vary variables in a formula via reference to another cell

G

Guest

I have a formula =SUMPRODUCT(--(b1:b10=a1),c1:c10) for a report I run
January. In Feb, I want to change c1.c10 to d1.d10 and in March to e1.e10 etc.
Ideal I'd like to name range c1.c10 "Jan" and d1.d10 "feb" etc and then
enter the month range name in cell x1 (eg: Jan) and have the formula pick it
up eg: =SUMPRODUCT(--(b1:b10=a1),+X1). But I can't get it to work! Any
ideas....? TVM.
 
N

N Harkawat

mask the cell x1 with indirect function as follows:
=SUMPRODUCT(--(b1:b10=a1),(indirect(X1)))
 
G

Guest

Thanks Mr Harkawat. You're a star!
--
Peter
London, UK


N Harkawat said:
mask the cell x1 with indirect function as follows:
=SUMPRODUCT(--(b1:b10=a1),(indirect(X1)))
 

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