uniqe list with zero balance condition

faizee

Board Regular
Joined
Jan 28, 2009
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
Dear all
i have a following data,


[TABLE="width: 765"]
<colgroup><col><col><col><col><col><col><col><col span="2"><col></colgroup><tbody>[TR]
[TD]S No[/TD]
[TD]Date[/TD]
[TD]Supplier[/TD]
[TD]Debit / Credit[/TD]
[TD]BILL NO[/TD]
[TD]Description[/TD]
[TD]Folio[/TD]
[TD]Debit[/TD]
[TD]Credit[/TD]
[TD]each bill balance[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]25-Jun-14[/TD]
[TD]Asif Traders[/TD]
[TD]Credit[/TD]
[TD]33[/TD]
[TD]received bill[/TD]
[TD]11[/TD]
[TD][/TD]
[TD]50000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]25-Jun-14[/TD]
[TD]Asif Traders[/TD]
[TD]Debit[/TD]
[TD]33[/TD]
[TD]payment againts chq no. 1122[/TD]
[TD]12[/TD]
[TD]40000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]05-Jul-14[/TD]
[TD]ABC TRADERS[/TD]
[TD]Credit[/TD]
[TD]55[/TD]
[TD]received bill[/TD]
[TD]22[/TD]
[TD][/TD]
[TD]40000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]05-Jul-14[/TD]
[TD]ABC TRADERS[/TD]
[TD]Debit[/TD]
[TD]56[/TD]
[TD]payment againts chq no. 1124[/TD]
[TD]4[/TD]
[TD]40000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]06-Aug-13[/TD]
[TD]Asif Brother[/TD]
[TD]Credit[/TD]
[TD]345[/TD]
[TD]received bill[/TD]
[TD]56[/TD]
[TD][/TD]
[TD]50000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]06-Aug-13[/TD]
[TD]Asif Brother[/TD]
[TD]Debit[/TD]
[TD]33[/TD]
[TD]payment againts chq no. 1128[/TD]
[TD]22[/TD]
[TD]25000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



I want the unique list of suppliers (column c), where balance is zero,
means. only need unique list of suppliers where sum of credit-sum of debit of this supplier is zero

the result of this data should be
Asif brother
Asif traders

Please help
thank you
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
ABC Traders are the only supplier in this information that has a balance of zero. Right?
 
Upvote 0
YES, You are right,
but I am sorry. i need where balance is not zero..

so the result would be
Asif Brother
Asif Traders
 
Upvote 0
If I'm right, then there's a solution for you. I would set up another table. Copy and paste all your suppliers into the second column of your new table. Use the "Data Tools" to "remove duplicates" in the column.
in column 3 of your new table set up a Debit list: use =Sumif(C:C, -here name the cell that the first supplier is in in your new table- , H:H)
in column 4 of your new table set up a credit list: use the same formula as above but sum range I:I instead of H:H
in column 1 of your new table set up a balance list: each cell = the corresponding Credits - Debits.
Now in another column set up a =VLOOKUP(0, Reference your total new table cells area here, 2, FALSE)
 
Last edited:
Upvote 0
Change the VLOOKUP suggestion. Rather, use another column to the right of the Credit column in the new table. Call this Debtor Creditors. formula =if(Column 1 value > 0 , Column 2 value, "")
This will list the debtors
 
Upvote 0
thank you for you reply,
but i cant remove duplicates, because i need real-time result.
if there is any supplier.whose balance is not zero.. it should be in the list.. if it has zero balance it should not come in the unique list
 
Upvote 0
Is your supplier list stagnant?

How about list the suppliers in column K
in column L drop this formula. It will show the balance for the Suppliers.

=(SUMIF(C:C,K2,H:H)-(SUMIF(C:C,K2,I:I)))
 
Last edited:
Upvote 0
Set up the table reversing column L and Column K as I mentioned above so that balance is in K and supplier in L.

next you will want to apply the formula discussed on this site:

How to look up a value in a list and return multiple corresponding values - Excel

I put a "0" in cell O1 Then in column P I have pasted:
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"][/TD]
[/TR]
</tbody>[/TABLE]
=IF(ISERROR(INDEX($L$1:$M$4,SMALL(IF($L$1:$L$4<0,ROW($L$1:$L$4)),ROW(10:10)),2)),"",INDEX($L$1:$M$4,SMALL(IF($L$1:$L$4<0,ROW($L$1:$L$4)),ROW(10:10)),2))


Works like a charm

IF the list is constantly updating and possibly adding new suppliers then you can create a list of suppliers using a formula like the one discussed on this website:

http://www.get-digital-help.com/200...-and-the-duplicates-in-excel-from-one-column/

for me, I have balance in column L and supplier in column M. In M2 and below I have: =INDEX($C$2:$C$1000, MATCH(0, COUNTIF($M$1:M1, $C$2:$C$1000), 0)) <--Array formula, and it's giving me the unique list.
 
Last edited:
Upvote 0
thank you for your reply,
it is bit confusing for me. is it possible i sent you my excel file. and you set this formula in it
i will be thankful to you
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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