sum+if

Vanda_a

Well-known Member
Joined
Oct 29, 2012
Messages
934
Dear all

Could you help me with this issue please?
I would like to sum only the transaction that does not contain "APPLE"
Ex :
NumNameDebitCredit
1APPLE1000sum only Num 2 and 3
1ABC100due to 1 contain "APPLE"
1001900
2ABC1000
2410100
2555900
3Orange1000
3Mango100
3001800
3555100

<colgroup><col><col span="3"><col></colgroup><tbody>
</tbody>

Thank you very much
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi,

Are you talking about the "Debit" or "Credit" Column?
 
Upvote 0
In E2 control+shift+enter, not just enter and copy across to F2:

=SUM(IF(ISNA(MATCH($A$2:$A$11,IF($B$2:$B$11="apple",$A$2:$A$11),0)),C$2:C$11))
 
Upvote 0
In E2 control+shift+enter, not just enter and copy across to F2:

=SUM(IF(ISNA(MATCH($A$2:$A$11,IF($B$2:$B$11="apple",$A$2:$A$11),0)),C$2:C$11))
Good morning. It works. Thank you very much. May i know what is ISNA is used in this formula?
 
Upvote 0
In E2 control+shift+enter, not just enter and copy across to F2:

=SUM(IF(ISNA(MATCH($A$2:$A$11,IF($B$2:$B$11="apple",$A$2:$A$11),0)),C$2:C$11))

Could you help explain why i can not invoke your formula into mine?
Code:
=SUM(IF(('All JL'!$B:$B="SINV")*(LEFT('All JL'!$E:$E,4)="PNN-")*(LEFT('All JL'!$F:$F,2)="41")+('All JL'!$G:$G="Customers' Deposits")*(ISNA(MATCH('All JL'!$E:$E,IF('All JL'!$G:$G="VAT-Output",'All JL'!$E:$E),0))),'All JL'!$I:$J))

I am trying to sum all transactions that contain no VAT-Output but the transactions has to meet some criteria as well. B:B="SINV", E:E first 4 letter ="PNN-", F:F first 2 letter = "41" or G:G = Customers' Deposits

Thank you
 
Last edited:
Upvote 0
1. You haven't told the outcome which obtains.

2. Avoid whole column referencing for efficiency reasons.

3. Why + ?

4. Does the following succeed? Control+shift+enter…

=SUM(IF(ISNA(MATCH('All JL'!$E$2:$E$100,IF('All JL'!$G$2:$G$100="VAT-Output",'All JL'!$E$2:$E$100),0)),IF((LEFT('All JL'!$E$2:$E$100,4)="PNN-")*('All JL'!$B$2:$B$100="SINV")*(LEFT('All JL'!$F$2:$F$100,2)="41")*('All JL'!$G$2:$G$100="Customers' Deposits"),'All JL'!$I$2:$J$100)))
 
Upvote 0
1. You haven't told the outcome which obtains.

2. Avoid whole column referencing for efficiency reasons.

3. Why + ?

4. Does the following succeed? Control+shift+enter…

=SUM(IF(ISNA(MATCH('All JL'!$E$2:$E$100,IF('All JL'!$G$2:$G$100="VAT-Output",'All JL'!$E$2:$E$100),0)),IF((LEFT('All JL'!$E$2:$E$100,4)="PNN-")*('All JL'!$B$2:$B$100="SINV")*(LEFT('All JL'!$F$2:$F$100,2)="41")*('All JL'!$G$2:$G$100="Customers' Deposits"),'All JL'!$I$2:$J$100)))

Good afternoon. it works now. Thank you very much. + sign because i would like to have or because if F:F is false then look up G:G.
By the way, may i know what is ISNA does in the formula?
 
Upvote 0
Good afternoon. it works now. Thank you very much. + sign because i would like to have or because if F:F is false then look up G:G.

Is this + still needed?

By the way, may i know what is ISNA does in the formula?

IF(ISNA(MATCH('All JL'!$E$2:$E$100,IF('All JL'!$G$2:$G$100="VAT-Output",'All JL'!$E$2:$E$100),0))

reads:

Filter for, i.e. select, the E cells which do not correspond to any G cell that equals VAT-Output. Thus:

If an E cell from the E range is not in the sublist of E cells for which G = VAT-Output (constructed by the inner IF in the quoted expression), execute the rest of the larger formula.
 
Upvote 0

Forum statistics

Threads
1,216,474
Messages
6,130,841
Members
449,598
Latest member
sunny_ksy

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