filter, sort and remove extra name

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
289
Office Version
  1. 365
Platform
  1. Windows
I have a current formula that works in filter and sort but it also gives duplicate name. Now, I would like to remove the extra or duplicate name. Is there any way to modify the formula?..thanks

H10 =SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1)

testing.xlsx
ABCDEFGHIJKLMNO
1NAMEDATEAMOUNTPAYMENTBALANCE
2NAME118-01-23500010001000
3NAME118-01-233000 
4NAME325-01-231000030002000
5NAME412-12-22500020000
6NAME412-12-221000 
7NAME605-02-23100007000
8NAME7 CURRENT FORMULAEXPECTED RESULT
9NAME8 NAMEDATEBALANCENAMEDATEBALANCE
10NAME325-01-235000 NAME118-01-231000NAME101-18-231000
11NAME10 NAME102-02-23500002-02-235000
12NAME605-02-233000 NAME325-01-232000NAME301-25-232000
13NAME12 NAME605-02-237000NAME602-05-237000
14NAME102-02-231000030005000NAME613-02-231000002-13-2310000
15NAME102-02-232000 
16NAME15 
17NAME613-02-231000010000
18NAME17 
19NAME412-12-222000 
20NAME19 
21NAME20 
Sheet21
Cell Formulas
RangeFormula
H10:J14H10=SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1)
E2:E21E2=IF(C2="","",SUMIFS(C:C,B:B,B2,A:A,A2)-SUMIFS(D:D,B:B,B2,A:A,A2))
Dynamic array formulas.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi

=LET(K,SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),HSTACK(SCAN(,CHOOSECOLS(K,1),LAMBDA(x,y,IF(x=y,"",y))),DROP(K,,1)))
 
Upvote 0
Hi

otherwise
=LET(K,SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),CHOOSE({1,2,2},SCAN(,SCEGLI.COL(K,1),LAMBDA(x,y,IF(x=y,"",y))),K))
 
Upvote 0
I have a current formula that works in filter and sort but it also gives duplicate name. Now, I would like to remove the extra or duplicate name. Is there any way to modify the formula?..thanks

H10 =SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1)

testing.xlsx
ABCDEFGHIJKLMNO
1NAMEDATEAMOUNTPAYMENTBALANCE
2NAME118-01-23500010001000
3NAME118-01-233000 
4NAME325-01-231000030002000
5NAME412-12-22500020000
6NAME412-12-221000 
7NAME605-02-23100007000
8NAME7 CURRENT FORMULAEXPECTED RESULT
9NAME8 NAMEDATEBALANCENAMEDATEBALANCE
10NAME325-01-235000 NAME118-01-231000NAME101-18-231000
11NAME10 NAME102-02-23500002-02-235000
12NAME605-02-233000 NAME325-01-232000NAME301-25-232000
13NAME12 NAME605-02-237000NAME602-05-237000
14NAME102-02-231000030005000NAME613-02-231000002-13-2310000
15NAME102-02-232000 
16NAME15 
17NAME613-02-231000010000
18NAME17 
19NAME412-12-222000 
20NAME19 
21NAME20 
Sheet21
Cell Formulas
RangeFormula
H10:J14H10=SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1)
E2:E21E2=IF(C2="","",SUMIFS(C:C,B:B,B2,A:A,A2)-SUMIFS(D:D,B:B,B2,A:A,A2))
Dynamic array formulas.

Please how to amend your formula if like name1 made payment in different date​
and balance should read 1000​
 
Upvote 0
Hi

otherwise
=LET(K,SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),CHOOSE({1,2,2},SCAN(,SCEGLI.COL(K,1),LAMBDA(x,y,IF(x=y,"",y))),K))
thanks man, appreciate the effort.. but both the formula gives different result..
1676869321925.png
 
Upvote 0
Hi

=LET(K,SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),HSTACK(SCAN(,CHOOSECOLS(K,1),LAMBDA(x,y,IF(x=y,"",y))),DROP(K,,1)))
hi ISY, when i refresh this formula "=LET(K,SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),HSTACK(SCAN(,CHOOSECOLS(K,1),LAMBDA(x,y,IF(x=y,"",y))),DROP(K,,1)))" it actually works.. however, when i add additional "name1 (with amount)" it duplicate.
1676956618216.png
 
Upvote 0
Hi

Support column required Cell V2
=CHOOSECOLS(SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),1)

New formula
=CHOOSE({1,2,2},BYROW(V2#,LAMBDA(x,IF(COUNTIF(V2:x,x)=1,x,""))),SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1))
 
Upvote 0
Solution
Hi

Support column required Cell V2
=CHOOSECOLS(SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1),1)

New formula
=CHOOSE({1,2,2},BYROW(V2#,LAMBDA(x,IF(COUNTIF(V2:x,x)=1,x,""))),SORT(FILTER(FILTER(A2:E21,(E2:E21>0)*(E2:E21<>"")),{1,1,0,0,1}),1,1))
thanks man.. it works..
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,094
Latest member
bsb1122

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