Help with changing column reference in formula

G

GoBucks

I have a long complex IF formula in which the following SUMPRODUCT formula is
contained.

SUMPRODUCT(--(AE11:AE20>0))

Depending on the value of cell A1, I would like to dynamically change the
column reference in the formula. For example:

IF A1 = 1, THEN use the column reference AE in the formula
IF A1 = 2, THEN use the column reference AF in the formula

Is there a way to accomplish this by INDIRECT or another formula? Thanks!
 
T

Tom Hutchins

Oops! Of course, I meant

=SUMPRODUCT(--(OFFSET(AE11:AE20,0,A1-1)>0))

Hutch
 

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