![]() |
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 |
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. |
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 |
All times are GMT +1. The time now is 07:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com