Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default SumIf Problem...trying to sum multiple columns

I need to sum multiple columns based on the value in one column and
the excel formula I used below always evaluates to 0 and I can't
understand why?

=SUMIF($AC$155:$AC$334,C62,$AM$155:$AR$334)

Here's some sample data assuming c62 = 1

AC AM AN AO AP AQ AR
Year ...... Cost 1 Cost 2 Cost 3 Cost 4 Cost 5 Cost 6
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00

Thanks for any input.

AJ

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumIf Problem...trying to sum multiple columns

Try: =SUMPRODUCT(($AC$155:$AC$334=C62)*$AM$155:$AR$334)

Albeit Excel accepts the SUMIF formula
with the multi-col sum range: $AM$155:$AR$334,
which leads one to wrongly think that it also works like that,
in reality, only the leftmost col: $AM$155:$AR$334 gets summed
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"AdmiralAJ" wrote in message
...
I need to sum multiple columns based on the value in one column and
the excel formula I used below always evaluates to 0 and I can't
understand why?

=SUMIF($AC$155:$AC$334,C62,$AM$155:$AR$334)

Here's some sample data assuming c62 = 1

AC AM AN AO AP AQ AR
Year ...... Cost 1 Cost 2 Cost 3 Cost 4 Cost 5 Cost 6
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00

Thanks for any input.

AJ



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumIf Problem...trying to sum multiple columns

Errata, line:
in reality, only the leftmost col: $AM$155:$AR$334 gets summed


should have read as:
in reality, only the leftmost col in the range, ie: $AM$155:$AM$334 gets
summed

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SumIf Problem...trying to sum multiple columns

Try this:

=SUMPRODUCT(($AC$155:$AC$334=1)*$AM$155:$AR$334)


--
Biff
Microsoft Excel MVP


"AdmiralAJ" wrote in message
...
I need to sum multiple columns based on the value in one column and
the excel formula I used below always evaluates to 0 and I can't
understand why?

=SUMIF($AC$155:$AC$334,C62,$AM$155:$AR$334)

Here's some sample data assuming c62 = 1

AC AM AN AO AP AQ AR
Year ...... Cost 1 Cost 2 Cost 3 Cost 4 Cost 5 Cost 6
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00

Thanks for any input.

AJ





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default SumIf Problem...trying to sum multiple columns

On Jan 9, 3:47 pm, "T. Valko" wrote:
Try this:

=SUMPRODUCT(($AC$155:$AC$334=1)*$AM$155:$AR$334)

--
Biff
Microsoft Excel MVP

"AdmiralAJ" wrote in message

...

I need to sum multiple columns based on the value in one column and
the excel formula I used below always evaluates to 0 and I can't
understand why?


=SUMIF($AC$155:$AC$334,C62,$AM$155:$AR$334)


Here's some sample data assuming c62 = 1


AC AM AN AO AP AQ AR
Year ...... Cost 1 Cost 2 Cost 3 Cost 4 Cost 5 Cost 6
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 83.61 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
1 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00
2 0.00 92.01 0.00 0.00 0.00 0.00


Thanks for any input.


AJ


Thanks everyone the solution worked great!
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
Sumif Multiple Columns [email protected] Excel Worksheet Functions 2 December 17th 07 08:40 PM
SUMIF and multiple columns wait3264 Excel Discussion (Misc queries) 3 August 11th 06 01:04 PM
SUMIF over multiple columns psmith4497 Excel Worksheet Functions 3 June 17th 05 06:40 PM
SUMIF accross multiple columns X Excel Worksheet Functions 3 April 14th 05 05:51 PM
Sumif over multiple columns Josh O. Excel Worksheet Functions 1 February 15th 05 04:33 PM


All times are GMT +1. The time now is 08:37 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"