LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default sumif with multiple critera range and sum_range

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"DocBrown" wrote in message
...
That is awsome! It works like a charm. I didn't think the ranges would
work
like that

Thank you a bunch.

John

"T. Valko" wrote:

=SUMIF(($J$31:$J$36:$O$31:$O$36:$T$31:$T$36),"="& C47,($L$31:$L$36:$Q$31:$Q$36:$V$31:$V$36))


Although Excel accepts the formula like that each "middle" range is being
ignored. That formula can be written like this and will produce the same
result:

=SUMIF($J$31:$T$36,C47,$L$31:$V$36)

Here is the pattern it's following:

Criteria range.....Sum range
............J....................L
............K..................M
............N..................P
............O..................Q
............R...................T
............S...................U
............V.....................

If you want to restructure your setup so you can squeeze in 12 months
worth
of data in the least amount of space then use every other column.

C = criteria range
S = sum range

C...S...C...S...C...S...C...S etc
J....K...L...M..N..O...P...Q etc

Then the offset in the formula is 1:

=SUMIF($J$31:$P$36,C47,$K$31:$Q$36)


--
Biff
Microsoft Excel MVP


"DocBrown" wrote in message
...
Hello,

I have a worksheet where I'm trying to use the sumif function to sum
over
multiple criteria ranges and multiple sum_ranges. The following
formula,
which shows three ranges, (surprisingly) works. Is there a more compact
way
to implement this? This is for a budget spreadsheet where each of the
ranges
(J31:J36 for example, are one month. So the full scale formula would
have
12
ranges and sum_ranges. Notice that the sum_ranges are offset two
columns
right of the critera range.

=SUMIF(($J$31:$J$36:$O$31:$O$36:$T$31:$T$36),"="&C 47,($L$31:$L$36:$Q$31:$Q$36:$V$31:$V$36))

If I rearranged the columns, would it that make it possible for a more
compact formula to work?

Thanks,
John






 
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
Sumif with multiple columns in sum_range dza7 Excel Discussion (Misc queries) 17 March 28th 08 07:25 PM
Sumif with multiple columns in sum_range dza7 Excel Worksheet Functions 17 March 28th 08 07:25 PM
SUMIF when using a range with critera Toppers Excel Discussion (Misc queries) 1 March 28th 07 01:56 AM
SUMIF when using a range with critera Teethless mama Excel Discussion (Misc queries) 0 March 28th 07 01:16 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 12:59 PM.

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

About Us

"It's about Microsoft Excel"