condense formula that sums 4 adjacent columns

  • Thread starter Thread starter SteveC
  • Start date Start date
S

SteveC

Any suggestions on how to make this shorter?

=INDEX(OFA!$DM$4:$DM$6000,MATCH(A2,OFA!$D$4:$D$6000,0),1)+INDEX(OFA!$DN$4:$DN$6000,MATCH(A2,OFA!$D$4:$D$6000,0),1)+INDEX(OFA!$DO$4:$DO$6000,MATCH(A2,OFA!$D$4:$D$6000,0),1)+INDEX(OFA!$DP$4:$DP$6000,MATCH(A2,OFA!$D$4:$D$6000,0),1)

many thanks!

SteveC
 
JE, this formula works great, thanks.

I don't understand though why the you are replacing the DM4 and DM3 though.
Would have thought DM4 would have stayed DM4. If you have time, can you
explain how that works? I need to understand OFFSET better... thanks very
much for your help. SteveC
 
MATCH returns 1 if it finds a match in the first cell of the array, so
if we used

...OFFSET(OFA!$DM4, 1...

it would start with DM5.

An alternative would be:

=SUM(OFFSET(OFA!$DM4,MATCH(A2,OFA!$D$4:$D$6000,FALSE) - 1,,,4))
 

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

Back
Top