Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default SUMIF with "OR" criteria

Hello, I'm having an issue with an IF-THEN formula. In my situation, I'm
trying to say," If A1:A5
= CA or DE or NJ or NY or PA or WI, then sum B1:B5"

Can anyone help?

Column A Column B
CA 2
NJ 3
DE 4
SC 5
TN 6

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default SUMIF with "OR" criteria

SwtHapa8 wrote:
Hello, I'm having an issue with an IF-THEN formula. In my situation, I'm
trying to say," If A1:A5
= CA or DE or NJ or NY or PA or WI, then sum B1:B5"

Can anyone help?

Column A Column B
CA 2
NJ 3
DE 4
SC 5
TN 6


Here are two functionally equivalent ways to do it:

=SUMPRODUCT((A1:A5="CA")+(A1:A5="NJ")+...,B1:B5)

(array* formula):
=SUM(IF((A1:A5="CA")+(A1:A5="NJ")+...,B1:B5))

Insert more (A1:A5="xx")+ conditions as needed.

*Commit the array formula by pressing Ctrl+Shift+Enter; do not just
press Enter or Tab.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMIF with "OR" criteria

see your other post

--
Biff
Microsoft Excel MVP


"SwtHapa8" wrote in message
...
Hello, I'm having an issue with an IF-THEN formula. In my situation, I'm
trying to say," If A1:A5
= CA or DE or NJ or NY or PA or WI, then sum B1:B5"

Can anyone help?

Column A Column B
CA 2
NJ 3
DE 4
SC 5
TN 6



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
How do I use "sumif" for cells "0" across multiple ranges? PKB Excel Discussion (Misc queries) 2 July 14th 09 01:05 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I use the criteria "is not blank" in a SUMIF formula? Pretender Excel Worksheet Functions 1 March 3rd 06 06:52 PM
"sumif" With Multiple Criteria! via135 Excel Worksheet Functions 3 January 19th 06 01:18 AM
results of "SUMIF" test criteria windsurferLA Excel Worksheet Functions 11 November 29th 05 04:42 PM


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