Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 130
Default Sumif want to sum a range bigger than one column

act 1 2
act 3 4
hr 5 6
act 7 8

I want to sum all the numbers in both columns B and C if the office code is
"hr"
in otherwords, sumif(a1:a4,"hr",b1:c4) to produce 11 (or 5 + 6).
Excel returns just the first column, or 5.
Do not want to break into two "sumif" statements...too much data. Array??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Sumif want to sum a range bigger than one column

Couple of ways you can handle this:

-----assuming that the titles are in A1-A4, and the values are in B1-C4-----

1) Array formula -- type in this formula: =sum(if($A$1:$A$4="hr",$B$1:$C$4))
---then hit ctrl+shift+enter.
2) 2 sumifs --- =SUMIF($A$1:$A$4,"hr",$B$1:$B$4)+SUMIF
$A$1:$A$4,"hr",$C$1:$C$4)

Good luck!

"Katie" wrote:

act 1 2
act 3 4
hr 5 6
act 7 8

I want to sum all the numbers in both columns B and C if the office code is
"hr"
in otherwords, sumif(a1:a4,"hr",b1:c4) to produce 11 (or 5 + 6).
Excel returns just the first column, or 5.
Do not want to break into two "sumif" statements...too much data. Array??

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Sumif want to sum a range bigger than one column

Assign D1 to hold your criteria (hr), and try this:

=SUMPRODUCT((A1:A4=D1)*(B1:C4))
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Katie" wrote in message
...
act 1 2
act 3 4
hr 5 6
act 7 8

I want to sum all the numbers in both columns B and C if the office code
is
"hr"
in otherwords, sumif(a1:a4,"hr",b1:c4) to produce 11 (or 5 + 6).
Excel returns just the first column, or 5.
Do not want to break into two "sumif" statements...too much data. Array??



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Sumif want to sum a range bigger than one column

Hi,

You could use either of the following plus many others:
=SUM((A1:A4="hr")*(B1:B4+C1:C4))
This formula is array entered - press Shift+Ctrl+Enter to enter it

The non-array entered equivalent
=SUMPRODUCT((A1:A4="hr")*(B1:B4+C1:C4))
--
Cheers,
Shane Devenshire
Microsoft Excel MVP

"Katie" wrote:

act 1 2
act 3 4
hr 5 6
act 7 8

I want to sum all the numbers in both columns B and C if the office code is
"hr"
in otherwords, sumif(a1:a4,"hr",b1:c4) to produce 11 (or 5 + 6).
Excel returns just the first column, or 5.
Do not want to break into two "sumif" statements...too much data. Array??

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
Excel 2000 (9.0.6926 SP3) spreadsheet getting bigger & bigger .... Leath Excel Discussion (Misc queries) 2 March 14th 06 06:04 AM
How I can print full text bigger than column, in repeat column Prince Excel Discussion (Misc queries) 0 August 11th 05 07:28 PM
Sumif where sum range is more than one column? John Mitchell Excel Worksheet Functions 1 June 23rd 05 05:26 AM
SUMIF using a multiple-column range Stefan Wrobel Excel Worksheet Functions 1 June 1st 05 01:18 AM
SUMIF using a multiple-column range Stefan Wrobel Excel Worksheet Functions 0 June 1st 05 12:01 AM


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