#1   Report Post  
Member
 
Posts: 54
Default SUMIF alternative

I have a spreadsheet that has 13 columns the first column for an identifier then 12 more columns one for each month. I can add a sum column but my data is based on a query and the number of rows changes constantly. Currently I am using sumif(A:A,"criteria",B:B)+sumif(A:A,"criteria",:C: C)+and so on so that I get all twelve months of data. Is there a better way to do a sumif that sums up all columns of data as opposed to adding 12 sumifs?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default SUMIF alternative

Hi Dave,

Am Wed, 6 Jul 2016 22:45:37 +0100 schrieb Dave H:

I have a spreadsheet that has 13 columns the first column for an
identifier then 12 more columns one for each month. I can add a sum
column but my data is based on a query and the number of rows changes
constantly. Currently I am using
sumif(A:A,"criteria",B:B)+sumif(A:A,"criteria",:C: C)+and so on so that I
get all twelve months of data. Is there a better way to do a sumif that
sums up all columns of data as opposed to adding 12 sumifs?


try:
=SUMPRODUCT((A2:A100=criteria)*B2:M100)


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Member
 
Posts: 54
Default

Quote:
Originally Posted by Claus Busch View Post
Hi Dave,

Am Wed, 6 Jul 2016 22:45:37 +0100 schrieb Dave H:

I have a spreadsheet that has 13 columns the first column for an
identifier then 12 more columns one for each month. I can add a sum
column but my data is based on a query and the number of rows changes
constantly. Currently I am using
sumif(A:A,"criteria",B:B)+sumif(A:A,"criteria",:C: C)+and so on so that I
get all twelve months of data. Is there a better way to do a sumif that
sums up all columns of data as opposed to adding 12 sumifs?


try:
=SUMPRODUCT((A2:A100=criteria)*B2:M100)


Regards
Claus B.
--
Windows10
Office 2016
Thanks that works!
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default SUMIF alternative

Also,

you can use arrary formula (sum with if)

sum(if((col1="a")*(col2="b"),sum_range,0))

enter with cntl+shift+entter

On Thursday, 7 July 2016 03:19:06 UTC+5:30, Dave H wrote:
I have a spreadsheet that has 13 columns the first column for an
identifier then 12 more columns one for each month. I can add a sum
column but my data is based on a query and the number of rows changes
constantly. Currently I am using
sumif(A:A,"criteria",B:B)+sumif(A:A,"criteria",:C: C)+and so on so that I
get all twelve months of data. Is there a better way to do a sumif that
sums up all columns of data as opposed to adding 12 sumifs?

Thanks




--
Dave H


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
returning text; alternative to sumproduct/sumif? ker_01 Excel Worksheet Functions 4 October 27th 09 12:24 AM
Sumif or Better Alternative? JeffTO Excel Worksheet Functions 2 July 24th 09 05:46 PM
alternative function to sumif Rich Excel Discussion (Misc queries) 1 December 16th 05 10:21 AM
SUMIF Alternative? qflyer Excel Worksheet Functions 2 June 20th 05 07:50 AM
SUMIF Alternative? qflyer Excel Discussion (Misc queries) 1 June 20th 05 06:23 AM


All times are GMT +1. The time now is 02:55 PM.

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"