using advanced filter for several of fields

T

thread

hi,
i want to use the advanced filter to populate more then one field is
it posible?
for now i have an option to filter data based on one field
for example if i have
AB
AB
AC
AC
AC
AC
AD
the result will be
AB
AC
AD
but i'm trying to have is for example if i have
AB X1
AB X1
AC X2
AC X2
AC X2
AC X2
AD X3
to get
AB X1
AC X2
AD X3

is it posible and if yes if for example i have alot of fields and i
want to to use specific what should be done?
 
G

Gary Keramidas

not sure if this would do what you want or not, but i'll throw it out.

assuming your examples are in columns A and B.

enter this formula in Column C:
=A2& " " &B2
and drag it down

then filter on column C

just a thought
 
S

sbitaxi

hi,
i want to use the advanced filter to populate more then one field is
it posible?
for now i have an option to filter data based on one field
for example if i have
AB
AB
AC
AC
AC
AC
AD
the result will be
AB
AC
AD
but i'm trying to have is for example if i have
AB X1
AB X1
AC X2
AC X2
AC X2
AC X2
AD X3
to get
AB X1
AC X2
AD X3

is it posible and if yes if for example i have alot of fields and i
want to to use specific what should be done?

Hello:

Not sure what you are intending with this, but if you are looking for
unique values in each of the columns, you can use the following code.
I advise changing the Range to the range of your data, and the Columns
values to the columns containing the fields you want to filter. Right
now it is only 2 columns (one for each advancedfilter) but if you want
more, just copy the 3 lines of code and change the column value to the
ones you want filtered.

Regards,

Steven

Sub MultiFilt()

' Duplicate this and change the column/Range values for every column
you want to filter
Range("A1:Z100").Columns(1).AdvancedFilter _
Action:=xlFilterInPlace, _
Unique:=True

Range("A1:Z100").Columns(2).AdvancedFilter _
Action:=xlFilterInPlace, _
Unique:=True

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top