ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel lookup in multiple areas (https://www.excelbanter.com/excel-worksheet-functions/115402-excel-lookup-multiple-areas.html)

Kitbasher

Excel lookup in multiple areas
 
I have a long log and I need to look up and sum if it meets certain criteria.
I have used sumif and that works for one criteria but how do I do a sumif
type function if I have more than one.

If B1:B100=X and C1:C100=Y then SUM D1:D100 if they contain both X&Y

JNW

Excel lookup in multiple areas
 
Use sumproduct
=SUMPRODUCT((B1:B100="x")*(C1:C100="y")*(D1:D100))
--
JNW


"Kitbasher" wrote:

I have a long log and I need to look up and sum if it meets certain criteria.
I have used sumif and that works for one criteria but how do I do a sumif
type function if I have more than one.

If B1:B100=X and C1:C100=Y then SUM D1:D100 if they contain both X&Y


Trevor Shuttleworth

Excel lookup in multiple areas
 
=SUMPRODUCT(--(B1:B100="X"),--(C1:C100="Y"),--(D1:D100))

Regards

Trevor


"Kitbasher" wrote in message
...
I have a long log and I need to look up and sum if it meets certain
criteria.
I have used sumif and that works for one criteria but how do I do a sumif
type function if I have more than one.

If B1:B100=X and C1:C100=Y then SUM D1:D100 if they contain both X&Y




vezerid

Excel lookup in multiple areas
 
=SUMPRODUCT((B1:B100=X)*(C1:C100=Y)*D1:D100)

HTH
Kostis Vezerides


Kitbasher wrote:
I have a long log and I need to look up and sum if it meets certain criteria.
I have used sumif and that works for one criteria but how do I do a sumif
type function if I have more than one.

If B1:B100=X and C1:C100=Y then SUM D1:D100 if they contain both X&Y



Lisa

Excel lookup in multiple areas
 
You can use the nested formula CTRL+SHIFT+ENTER, however, I would recommend
using Conditional Sum - Go to Tools/Add ins and select conditional Sum.
"Kitbasher" wrote:

I have a long log and I need to look up and sum if it meets certain criteria.
I have used sumif and that works for one criteria but how do I do a sumif
type function if I have more than one.

If B1:B100=X and C1:C100=Y then SUM D1:D100 if they contain both X&Y



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com