Exclude from list, Advance Filter

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,846
Office Version
  1. 365
Platform
  1. Windows
I have list of account numbers, I need to exclude few account numbers from the list, for example:

Exclude account 9204xxx (should net to zero)</SPAN>
Exclude cap load account 922xxxx</SPAN>
Exclude benefits account 926xxxx</SPAN>
</SPAN>Exclude benefits acct xxxx008, 047, 048, 050, 052, 054
Exclude allocated rent - 486RENTR, 651AMORTAL
Etc,

Regards
</SPAN>
</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL></COLGROUP>
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi Sohail,

I don't know how to do this by using advanced filter, but does this formula solution work for you?...

Excel Workbook
ABCDEF
1AccountsResultsExclude Accounts
2Test123Test1239204xxx
39204xxxTest124922xxxx
4Test124Test125926xxxx
5922xxxxTest126xxxx008
6926xxxxTest127xxxx047
7xxxx008Test128xxxx048
8Test125xxxx050
9Test126xxxx052
10xxxx047xxxx054
11xxxx048489RENTR
12xxxx050651AMORTAL
13Test127
14xxxx052
15xxxx054
16489RENTR
17651AMORTAL
18Test128
19
SampleData


The formula in C2 needs to be entered using ctrl shift enter NOT just enter, it can then be copied down.
You will obviously need to change the cell references to suit your layout.

You could also you a Named Range for your (criteria) Exclude Accounts.
So instead of using $E$2:$E$12 in the above formula, you can use a Named Range.

I have used the Named Range, ExAcc in this formula...

=IFERROR(INDEX($A$2:$A$18,SMALL(IF(ISNA(MATCH($A$2:$A$18,ExAcc,0)),ROW($A$2:$A$18)),ROWS(C$2:C2))-ROW($A$2)+1),"")

I hope that helps.

Ak
 
Upvote 0
Akaswani,
thank you very much, I have not tried the formula yet, but just by ananlyzing it, it seems this is what I was looking for.
Great, thanks again

Sohail
 
Upvote 0
Or with Advanced Filter (using data sample provided by Ak)

Put in G2 this formula
=ISNA(MATCH(A2,$E$2:$E$12,0))

In Advanced Filter
pick Copy To
List Range: $A$1:$A$18
Criteria Range: $G$1:$G$2
Copy To:$C$1

M.
 
Upvote 0
Thank you Marcelo,
Yes, I wanted to exclude the list from the big list.
But my file has many columns, and the rows that contains these exclusions should be filtered out.

I will try your formula using advance filter, I understood.

Great,

Regards

Sohail
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,091
Messages
6,128,772
Members
449,468
Latest member
AGreen17

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