Best formula to use to pull in values with 2 true criteria's

Steph_pmg

New Member
Joined
Jun 29, 2018
Messages
10
I am adding values together from 2 different sheets based on 1. date (in its own column) AND 2. if the description contains "AP" or "CD" (In another column) to populate on a summary tab.

I have tried the following formulas:
For my values containing AP or CD
1. =SUMPRODUCT(('GL Pivot'!B9:B405=Summary!A11)*('GL Pivot'!C9:C405="*AP*")*('GL Pivot'!C9:C405="*CD*")*('GLPivot'!E9:E405))

2. =INDEX('GL Pivot'!$B$4:$E$84,MATCH(A12,'GL Pivot'!B7:$B$84,0),4)+SUMIF('GL Pivot'!C:C,"*CD*",'GL Pivot'!E:E)

For my values containing 201 or 501
1. =SUMIF('Bank Pivot'!$A:$A,A22,'Bank Pivot'!$D:$D)+SUMIF('Bank Pivot'!$A:$A,$B$8,'Bank Pivot'!$D:$D)+SUMIF('BankPivot'!$A:$A,$C$8,'Bank Pivot'!$D:$D)

SUMIF is performing an "or" and not giving me all the data.
INDEX MATCH is returning the total number and not the amount based on criteria
SUMPRODUCT is returning ZERO and not the amount based on criteria

How can I get any of the formulas to total amounts based on a daily date and that also include certain text in the description column from a different tab onto my main summary tab per date?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I could only achieve this with a helper column for AP or CD

On Sheet2, I used this in Column E, checking column D with cells containing AP or CD, which resulted in 1 or 0;
Code:
=SUMPRODUCT(--ISNUMBER(SEARCH({"*AP*","*CD*"},D2)))


Then on Sheet1 I have dates in Column B;
Code:
=SUMPRODUCT(--(Sheet2!A2:A16=Sheet1!B3),--(Sheet2!E2:E16=1),(Sheet2!B2:B16+Sheet2!C2:C16))


This returned a total figure for Columns B + C, if the Sheet1 dates matched the Sheet2 rows Date & cells containing AP or CD.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top