Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Formulas Instead of Advanced Filter

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  dvd disappear  
Author Message
Moily

External


Since: Dec 16, 2008
Posts: 5



(Msg. 1) Posted: Mon Jan 19, 2009 8:12 am
Post subject: Formulas Instead of Advanced Filter
Archived from groups: microsoft>public>excel (more info?)

Hi there,

I have Excel 2003 and want to have formulas that do the same work as
Advanced Filtering. I currently have a system that looks at data in one
column (X) and, with a mixture of If, Index and Match formulas, determines
unique data and places it in a neat column (AI). The formulas are below.
However, I now have eleven columns that hold most of the same data but each
column may (or may not) have one or two more unique data in addition to the
data that is shared by the majority. If I had the data in columns V2:AF300
and wanted to have the unique information in a neat column starting from B15
how could I ammend the below formulas or what could I use instead?

Thanks in advance for your help!
Ann

I currently have data in X2:X495
I then have the following in cell AI2:
=IF(INDEX(X2:X495,MATCH(0,-ISBLANK(X2:X495),0))=".","EXTRA",INDEX(X2:X495,MATCH(0,-ISBLANK(X2:X495),0)))
And in cell AI3:
=IF(IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),INDEX(X$2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)),"")=".","EXTRA",IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),INDEX(X$2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)),""))
And then drag down the formulas from cell AI3.

 >> Stay informed about: Formulas Instead of Advanced Filter 
Back to top
Login to vote
Pete_UK

External


Since: Dec 4, 2008
Posts: 17



(Msg. 2) Posted: Mon Jan 19, 2009 8:30 am
Post subject: Re: Formulas Instead of Advanced Filter
Archived from groups: per prev. post (more info?)

Perhaps you could use a helper column (AG ?) and concatenate the data
from those 11 columns:

=V2&W2&X2&Y2&Z2&AA2&AB2&AC2&AD2&AE2&AF2

copied down. Then instead of column X in your formulae you could
change this to column AG.

Hope this helps.

Pete

On Jan 19, 4:12 pm, moily wrote:
> Hi there,
>
> I have Excel 2003 and want to have formulas that do the same work as
> Advanced Filtering.  I currently have a system that looks at data in one
> column (X) and, with a mixture of If, Index and Match formulas, determines
> unique data and places it in a neat column (AI).  The formulas are below.  
> However, I now have eleven columns that hold most of the same data but each
> column may (or may not) have one or two more unique data in addition to the
> data that is shared by the majority.  If I had the data in columns V2:AF300
> and wanted to have the unique information in a neat column starting from B15
> how could I ammend the below formulas or what could I use instead?
>
> Thanks in advance for your help!
> Ann
>
> I currently have data in X2:X495
> I then have the following in cell AI2:
> =IF(INDEX(X2:X495,MATCH(0,-ISBLANK(X2:X495),0))=".","EXTRA",INDEX(X2:X495,M­ATCH(0,-ISBLANK(X2:X495),0)))
> And in cell AI3:
> =IF(IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),INDEX(X$­2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)),"")="­.","EXTRA",IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),I­NDEX(X$2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)­),""))
> And then drag down the formulas from cell AI3.

 >> Stay informed about: Formulas Instead of Advanced Filter 
Back to top
Login to vote
Moily

External


Since: Dec 16, 2008
Posts: 5



(Msg. 3) Posted: Mon Jan 19, 2009 9:25 am
Post subject: Re: Formulas Instead of Advanced Filter
Archived from groups: per prev. post (more info?)

Hi,

If I understand it correctly your suggestion would create 300 unique answers
though wouldn't it? Please tell me if I'm misunderstanding though!

Basically, I have 7 original options, 4 of those options are found in the
first column. The other columns would repeat many of the popular 4 but the 3
others can also be found in one or a few of the later columns. Example
(simplified to 5 options instead of 7 and 3 columns instead of 11):

Column1: Column 2: Column 3:
Yes No Maybe
No Yes Yes
Maybe Maybe No
No Whenever Anytime
No Maybe Whenever

I need to have a list of:
Yes
No
Maybe
Whenever
Anytime

Concatenate would create the following which would make all the rows unique
answers:
YesNoMaybe
NoYesYes
MaybeMaybeNo
NoWheneverAnytime
NoMaybeWhenever



"Pete_UK" wrote:

> Perhaps you could use a helper column (AG ?) and concatenate the data
> from those 11 columns:
>
> =V2&W2&X2&Y2&Z2&AA2&AB2&AC2&AD2&AE2&AF2
>
> copied down. Then instead of column X in your formulae you could
> change this to column AG.
>
> Hope this helps.
>
> Pete
>
> On Jan 19, 4:12 pm, moily wrote:
> > Hi there,
> >
> > I have Excel 2003 and want to have formulas that do the same work as
> > Advanced Filtering. I currently have a system that looks at data in one
> > column (X) and, with a mixture of If, Index and Match formulas, determines
> > unique data and places it in a neat column (AI). The formulas are below.
> > However, I now have eleven columns that hold most of the same data but each
> > column may (or may not) have one or two more unique data in addition to the
> > data that is shared by the majority. If I had the data in columns V2:AF300
> > and wanted to have the unique information in a neat column starting from B15
> > how could I ammend the below formulas or what could I use instead?
> >
> > Thanks in advance for your help!
> > Ann
> >
> > I currently have data in X2:X495
> > I then have the following in cell AI2:
> > =IF(INDEX(X2:X495,MATCH(0,-ISBLANK(X2:X495),0))=".","EXTRA",INDEX(X2:X495,M­ATCH(0,-ISBLANK(X2:X495),0)))
> > And in cell AI3:
> > =IF(IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),INDEX(X$­2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)),"")="­.","EXTRA",IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),I­NDEX(X$2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)­),""))
> > And then drag down the formulas from cell AI3.
>
>
 >> Stay informed about: Formulas Instead of Advanced Filter 
Back to top
Login to vote
Roger Govier

External


Since: Dec 8, 2008
Posts: 11



(Msg. 4) Posted: Thu Jan 22, 2009 9:25 am
Post subject: Re: Formulas Instead of Advanced Filter
Archived from groups: per prev. post (more info?)

Hi Ann

If a VBA solution is acceptable to you, the following code will achieve what
you want.
I copied your data to column A:C and placed my result in column E

You would need to adjust myrange to suit your range of data and change "E"
to "B" in the code

Sub findunique()
Dim i As Long
Dim c As Range, myrange As Range
Set myrange = ActiveSheet.Range("A1:C5")
i = 15
For Each c In myrange
If WorksheetFunction.CountIf(Range(Cells(1, "E"), _
Cells(i, "E")), c.Value) = 0 Then
Cells(i, "E") = c.Value
i = i + 1
End If
Next c
End Sub

Copy the Code above
Alt+F11 to invoke the VB Editor
Insert>Module
Paste code into white pane that appears
Alt+F11 to return to Excel

To use
Alt+F8 to bring up Macros
Highlight the macro name
Run
 >> Stay informed about: Formulas Instead of Advanced Filter 
Back to top
Login to vote
Moily

External


Since: Dec 16, 2008
Posts: 5



(Msg. 5) Posted: Fri Jan 23, 2009 1:57 am
Post subject: Re: Formulas Instead of Advanced Filter
Archived from groups: per prev. post (more info?)

Hi Roger,

I've used VBA in the past but I find if the spreadsheet changes
(rows/columns added/deleted) then they don't adjust accordingly as formulas
do and then they break! This is a spreadsheet that will be used for several
years at least and if I have a successor they won't know why it's broken.
It's best to use formulas unless I'm just using VBA wrong and there's a way
to have it automatically update with any changes made to the sheet?

Thank you for your suggestion though!

Best,
Ann

"Roger Govier" wrote:

> Hi Ann
>
> If a VBA solution is acceptable to you, the following code will achieve what
> you want.
> I copied your data to column A:C and placed my result in column E
>
> You would need to adjust myrange to suit your range of data and change "E"
> to "B" in the code
>
> Sub findunique()
> Dim i As Long
> Dim c As Range, myrange As Range
> Set myrange = ActiveSheet.Range("A1:C5")
> i = 15
> For Each c In myrange
> If WorksheetFunction.CountIf(Range(Cells(1, "E"), _
> Cells(i, "E")), c.Value) = 0 Then
> Cells(i, "E") = c.Value
> i = i + 1
> End If
> Next c
> End Sub
>
> Copy the Code above
> Alt+F11 to invoke the VB Editor
> Insert>Module
> Paste code into white pane that appears
> Alt+F11 to return to Excel
>
> To use
> Alt+F8 to bring up Macros
> Highlight the macro name
> Run
>
>
> --
> Regards
> Roger Govier
>
> "moily" wrote in message
>
> > Hi,
> >
> > If I understand it correctly your suggestion would create 300 unique
> > answers
> > though wouldn't it? Please tell me if I'm misunderstanding though!
> >
> > Basically, I have 7 original options, 4 of those options are found in the
> > first column. The other columns would repeat many of the popular 4 but
> > the 3
> > others can also be found in one or a few of the later columns. Example
> > (simplified to 5 options instead of 7 and 3 columns instead of 11):
> >
> > Column1: Column 2: Column 3:
> > Yes No Maybe
> > No Yes Yes
> > Maybe Maybe No
> > No Whenever Anytime
> > No Maybe Whenever
> >
> > I need to have a list of:
> > Yes
> > No
> > Maybe
> > Whenever
> > Anytime
> >
> > Concatenate would create the following which would make all the rows
> > unique
> > answers:
> > YesNoMaybe
> > NoYesYes
> > MaybeMaybeNo
> > NoWheneverAnytime
> > NoMaybeWhenever
> >
> >
> >
> > "Pete_UK" wrote:
> >
> >> Perhaps you could use a helper column (AG ?) and concatenate the data
> >> from those 11 columns:
> >>
> >> =V2&W2&X2&Y2&Z2&AA2&AB2&AC2&AD2&AE2&AF2
> >>
> >> copied down. Then instead of column X in your formulae you could
> >> change this to column AG.
> >>
> >> Hope this helps.
> >>
> >> Pete
> >>
> >> On Jan 19, 4:12 pm, moily wrote:
> >> > Hi there,
> >> >
> >> > I have Excel 2003 and want to have formulas that do the same work as
> >> > Advanced Filtering. I currently have a system that looks at data in
> >> > one
> >> > column (X) and, with a mixture of If, Index and Match formulas,
> >> > determines
> >> > unique data and places it in a neat column (AI). The formulas are
> >> > below.
> >> > However, I now have eleven columns that hold most of the same data but
> >> > each
> >> > column may (or may not) have one or two more unique data in addition to
> >> > the
> >> > data that is shared by the majority. If I had the data in columns
> >> > V2:AF300
> >> > and wanted to have the unique information in a neat column starting
> >> > from B15
> >> > how could I ammend the below formulas or what could I use instead?
> >> >
> >> > Thanks in advance for your help!
> >> > Ann
> >> >
> >> > I currently have data in X2:X495
> >> > I then have the following in cell AI2:
> >> > =IF(INDEX(X2:X495,MATCH(0,-ISBLANK(X2:X495),0))=".","EXTRA",INDEX(X2:X495,M­ATCH(0,-ISBLANK(X2:X495),0)))
> >> > And in cell AI3:
> >> > =IF(IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),INDEX(X$­2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)),"")="­.","EXTRA",IF(COUNT(MATCH(X$2:X$495,AI$2:AI2,0))<COUNT(1/(X$2:X$495<>"")),I­NDEX(X$2:X$495,MATCH(0,(X$2:X$495<>"")-ISNA(MATCH(X$2:X$495,AI$2:AI2,0)),0)­),""))
> >> > And then drag down the formulas from cell AI3.
> >>
> >>
>
 >> Stay informed about: Formulas Instead of Advanced Filter 
Back to top
Login to vote
Roger Govier

External


Since: Dec 8, 2008
Posts: 11



(Msg. 6) Posted: Fri Jan 23, 2009 1:25 pm
Post subject: Re: Formulas Instead of Advanced Filter
Archived from groups: per prev. post (more info?)

Hi Ann

It is easy to adjust to ask the user for the range required ( which
columns).
The number of rows can be determined automatically.
Likewise, you can ask for the starting cell where the answers are to be
written.
But, if you are set against using VBA, then as you will have seen from max's
posts it is a long complicated process to deal with by formula.
 >> Stay informed about: Formulas Instead of Advanced Filter 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Changing pivot datasource by formulas? - Hi guys :) I not quite sure if there is any solution to this. My last chance is to cry for help in this room of qualifications... (aaaargh!!) This monthly "cut-off" report of mine is based on one chosen dataset (the last monthly) - placed in ...

How to Past cells with formulas not using "$" without chan.. - Hello, I would like to copy / past a large amount of cells in which "$" has not been used in formules. Problem : referenced are changed (because "$" is not there). Example in A1 : "=B1+C1" if I copy A1 to A50 : the con...

Prepare-Document Properties-Advanced Options Greyed out - I can't get access to the advanced options to change the hyperlink base of a workbook. Anyone got any idea why this button would be greyed out. I tried a blank workbook and it worked fine. Thanks.

Filter rows/transactions to another sheet. - Hi I have a sheet with 6500 transactions in rows. Each row contains an account no, amount, etc I would like to have Excel automatically copy all the rows/transactions on each account to a separate sheet in the same workbook (one account per sheet)....

advance filter unique records except on column - Is there a way to filter a database to find unique records where one column is ignored? I have over 6,000 records with the following columns. Cust_rec, Bco, pol_csr, Expires, Cust_name, Cust_attn, Pol_type I want to eliminate duplicates..
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]