Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
EJ EJ is offline
external usenet poster
 
Posts: 20
Default SUM IF with conditions in another column

I've been using =SUMIF(C$5:C$317,"0.5") - column C can contain any value
between 1 and 50 or text and I need the sum of any numerical values, but I
only need it to use this if cells in column B meet a particular criteria.

  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default SUM IF with conditions in another column

=sumif(b5:b317,criteria,c5:c17)

Check also sumproduct() for more complicated structures

=sumproduct(--(and(b5:b317=criteria1,b5:b317=criterian2)),--(c5:c3170.5),c5:c317)
as an example

"EJ" wrote:

I've been using =SUMIF(C$5:C$317,"0.5") - column C can contain any value
between 1 and 50 or text and I need the sum of any numerical values, but I
only need it to use this if cells in column B meet a particular criteria.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default SUM IF with conditions in another column


"bj" wrote in message
...
Check also sumproduct() for more complicated structures

=sumproduct(--(and(b5:b317=criteria1,b5:b317=criterian2)),--(c5:c3170.5),c5:c317)



You don't do ANDs in SP like that, you use

--(B5:B317=criteria1),--(B5:B317=criteria2)

but that is actually nonsensical because a cell cannot be two different
values, so you probably mean OR, wich is done as

=SUMPRODUCT(--((B5:B317=criteria1)+(B5:B317=criteria2)),--(C5:C3170.5),C5:C317)


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
Lookup function/sum function Secret Squirrel Excel Discussion (Misc queries) 24 November 21st 06 01:46 AM
How do I combine spreadsheets and documents in one file? Trish Excel Discussion (Misc queries) 3 November 9th 06 09:17 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Add items in column 3 if column 1 and 2 conditions are met DB16 Excel Worksheet Functions 2 August 16th 05 02:00 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


All times are GMT +1. The time now is 07:28 AM.

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"