SUMIF criteria met or not met.

Wobzy

Board Regular
Joined
Mar 25, 2017
Messages
54
Hi Guys,

A
B
C
D
E
F
1
MERGED_A1
MERGED_A1
MERGED_A1
MERGED_D1
MERGED_D1
MERGED_D1
2
$50
ITEM
PAID
$45
ITEM
CANCEL
3
MERGED_A3
MERGED_A3
MERGED_A3
MERGED_D3
MERGED_D3
MERGED_D3
4
$50
ITEM
PENDING
$50
ITEM
PAID

<tbody>
</tbody>

My working sheet is much larger but this is the jist of it.

My formula needs to SUM A2,D2,A4,D4 only IF C2,F2,C4,F4 are not equal to "CANCEL" or "PENDING".
I also need to SUM the same former range in the instance that the latter range is equal to CANCEL.

Help is appreciated.

Thank you.
 
Not sure if i understand what you are looking for

See if this helps


A
B
C
D
E
F
G
H
I
1
MERGED_A1​
MERGED_A1​
MERGED_A1​
MERGED_D1​
MERGED_D1​
MERGED_D1​
Formula​
Exclude​
2
50​
ITEM​
PAID​
45​
ITEM​
CANCEL​
100​
CANCEL​
3
MERGED_A3​
MERGED_A3​
MERGED_A3​
MERGED_D3​
MERGED_D3​
MERGED_D3​
PENDING​
4
50​
ITEM​
PENDING​
50​
ITEM​
PAID​

<tbody>
</tbody>


Named range Exclude = I2:I3 (gray area) contains the keywords that should not be taken in account in calculations.

Formula in H2
=SUMPRODUCT(N(+A2:D4)*ISNA(MATCH(C2:F4,Exclude,0)))

M.
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
The problem is you are using garbage data with bad formatting. Remove merged cells, merged cells are a huge headache when analyzing data. Second, put all similar information in the same column. Maybe work on a macro to format this correctly.

Thanks for that long string of useless words, but I hope you mind if I disregard your opinion and go with Marcello's solid ability to provide actual answers to the question being asked.
 
Upvote 0
Not sure if i understand what you are looking for

See if this helps


A
B
C
D
E
F
G
H
I
1
MERGED_A1​
MERGED_A1​
MERGED_A1​
MERGED_D1​
MERGED_D1​
MERGED_D1​
Formula​
Exclude​
2
50​
ITEM​
PAID​
45​
ITEM​
CANCEL​
100​
CANCEL​
3
MERGED_A3​
MERGED_A3​
MERGED_A3​
MERGED_D3​
MERGED_D3​
MERGED_D3​
PENDING​
4
50​
ITEM​
PENDING​
50​
ITEM​
PAID​

<tbody>
</tbody>


Named range Exclude = I2:I3 (gray area) contains the keywords that should not be taken in account in calculations.

Formula in H2
=SUMPRODUCT(N(+A2:D4)*ISNA(MATCH(C2:F4,Exclude,0)))

M.


You're an absolute champion mate.
 
Upvote 0

Forum statistics

Threads
1,215,580
Messages
6,125,654
Members
449,245
Latest member
PatrickL

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