SUMIF - HLOOKUP Combination

G

Guest

I have a sumif formula where the sum_range is a specific column.

The column varies from month to month. I can identify the column by using
the hlookup function.

Can I return the column letter to the sumif function using the hlookup?
Normally the hlookup returns the value and not the cell address.

Is there another function I am not aware of that will accomplish this?

Thanks for your help.
 
B

Bernie Deitrick

Mark,

Instead of HLOOKUP, use a combination of Index and Match. For example, if
cell A1 has a value that matches a header in row 3, and that is the column
you want to pass to the SUMIF

=SUMIF(A3:A100,"A",INDEX(3:100,,MATCH(A1,3:3,FALSE)))

HTH,
Bernie
MS Excel MVP
 

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