Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default condense formula that sums 4 adjacent columns

Any suggestions on how to make this shorter?

=INDEX(OFA!$DM$4:$DM$6000,MATCH(A2,OFA!$D$4:$D$600 0,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,O FA!$D$4:$D$6000,0),1)+INDEX(OFA!$DP$4:$DP$6000,MAT CH(A2,OFA!$D$4:$D$6000,0),1)

many thanks!

SteveC


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default condense formula that sums 4 adjacent columns

One way:

=SUM(OFFSET(OFA!$DM3,MATCH(A2,OFA!$D$4:$D$6000,FAL SE),,,4))


In article ,
SteveC wrote:

Any suggestions on how to make this shorter?

=INDEX(OFA!$DM$4:$DM$6000,MATCH(A2,OFA!$D$4:$D$600 0,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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default condense formula that sums 4 adjacent columns

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

"JE McGimpsey" wrote:

One way:

=SUM(OFFSET(OFA!$DM3,MATCH(A2,OFA!$D$4:$D$6000,FAL SE),,,4))


In article ,
SteveC wrote:

Any suggestions on how to make this shorter?

=INDEX(OFA!$DM$4:$DM$6000,MATCH(A2,OFA!$D$4:$D$600 0,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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default condense formula that sums 4 adjacent columns

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,FAL SE) - 1,,,4))

In article ,
SteveC wrote:

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

"JE McGimpsey" wrote:

One way:

=SUM(OFFSET(OFA!$DM3,MATCH(A2,OFA!$D$4:$D$6000,FAL SE),,,4))

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default condense formula that sums 4 adjacent columns

thanks again.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default condense formula that sums 4 adjacent columns

Another one:

=SUM(INDEX(OFA!DM4:DP6000,MATCH(A2,OFA!D4:D6000,0) ,))


--
Biff
Microsoft Excel MVP


"SteveC" wrote in message
...
Any suggestions on how to make this shorter?

=INDEX(OFA!$DM$4:$DM$6000,MATCH(A2,OFA!$D$4:$D$600 0,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,O FA!$D$4:$D$6000,0),1)+INDEX(OFA!$DP$4:$DP$6000,MAT CH(A2,OFA!$D$4:$D$6000,0),1)

many thanks!

SteveC




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to match 7 columns of non adjacent data [email protected] Excel Worksheet Functions 0 January 10th 08 11:11 PM
Conditional sums for adjacent cells Eric Excel Worksheet Functions 6 January 29th 07 09:00 PM
How do I condense 3 columns into 1 in Excel? Niki Excel Worksheet Functions 1 April 13th 06 06:32 PM
Condense formula Derek Y via OfficeKB.com Excel Worksheet Functions 9 November 18th 05 03:00 AM
Help to condense a formula GerryK Excel Worksheet Functions 1 June 29th 05 08:19 PM


All times are GMT +1. The time now is 02:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"