Filtering #11

Hi, can ayone tell me how I could do the following in excel 2007 or
2010:



Horse 	Trainer

Sam	M Jones
John	M Jones
Colin 	S Attwater
Steve	J Jackson
Brian 	B Mathers
James 	B Mathers
Martin	G Raggy
Patrick	S Thomson


What I want to do is filter the dataset on 'Trainer' so that it only
shows me the Trainers who feature once in the list. So if I was to do
this properly it would only show S Attwater and G Raggy as the other
trainers have more than one horse.....


Hopefully someone can help because it is driving me crazy !!

Thanks

David
0
sam5874 (72)
2/12/2011 7:08:26 PM
excel 39879 articles. 2 followers. Follow

4 Replies
775 Views

Similar Articles

[PageSpeed] 25

Give this macro a try...

Sub HideDuplicateTrainers()
  Dim X As Long, R As Range, LastRow As Long, LastColumnPlusOne As Long
  Const TrainerColumn As String = "B"
  Const DataStartCell As Long = 2
  Application.ScreenUpdating = False
  ActiveSheet.UsedRange.Rows.Hidden = False
  LastRow = Cells(Rows.Count, TrainerColumn).End(xlUp).Row
  LastColumnPlusOne = Cells.Find(What:="*", SearchOrder:=xlByColumns, 
SearchDirection:=xlPrevious, LookIn:=xlFormulas).Column + 1
  Range(Cells(DataStartCell, TrainerColumn), Cells(LastRow, 
TrainerColumn)).Copy Cells(DataStartCell, LastColumnPlusOne)
  For X = DataStartCell To LastRow
    If WorksheetFunction.CountIf(Range(Cells(DataStartCell, 
LastColumnPlusOne), Cells(LastRow, LastColumnPlusOne)), Cells(X, 
LastColumnPlusOne).Value) > 1 Then
      With Range(Cells(DataStartCell, LastColumnPlusOne), Cells(LastRow, 
LastColumnPlusOne))
        .Replace Cells(X, LastColumnPlusOne), "", xlWhole, , False
        .SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
      End With
    End If
  Next
  Application.ScreenUpdating = True
  Columns(LastColumnPlusOne).Clear
End Sub

Rick Rothstein (MVP - Excel)






wrote in message news:mbmdl6935p0osklkrds9ra0hq9pb5b3p3e@4ax.com...

Hi, can ayone tell me how I could do the following in excel 2007 or
2010:



Horse Trainer

Sam M Jones
John M Jones
Colin S Attwater
Steve J Jackson
Brian B Mathers
James B Mathers
Martin G Raggy
Patrick S Thomson


What I want to do is filter the dataset on 'Trainer' so that it only
shows me the Trainers who feature once in the list. So if I was to do
this properly it would only show S Attwater and G Raggy as the other
trainers have more than one horse.....


Hopefully someone can help because it is driving me crazy !!

Thanks

David 

0
2/12/2011 7:44:49 PM
sam@theman.com was thinking very hard :
> Hi, can ayone tell me how I could do the following in excel 2007 or
> 2010:
>
>
>
> Horse 	Trainer
>
> Sam	M Jones
> John	M Jones
> Colin 	S Attwater
> Steve	J Jackson
> Brian 	B Mathers
> James 	B Mathers
> Martin	G Raggy
> Patrick	S Thomson
>
>
> What I want to do is filter the dataset on 'Trainer' so that it only
> shows me the Trainers who feature once in the list. So if I was to do
> this properly it would only show S Attwater and G Raggy as the other
> trainers have more than one horse.....
>
>
> Hopefully someone can help because it is driving me crazy !!
>
> Thanks
>
> David

I have used a formula to enter a 'flag' in a program column that I can 
autofilter on.

  Example:
  ColB is named "TrainerNames" and defined as fully absolute ("$B:$B").
  Cell B1 is active and named "TrainerName", and is defined as
    column-absolute, row-relative ("$B1")

  In the program column:
    Select row1 and enter:
      "=IF(COUNTIF(TrainerNames,TrainerName)=1,"TRUE","FALSE")
This sets the value to "TRUE" if the trainer's name appears only once. 
I can filter on this to hide all other names.

-- 
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


0
gs3102 (378)
2/12/2011 10:26:07 PM
>What I want to do is filter the dataset on 'Trainer' so that it only
>shows me the Trainers who feature once in the list. So if I was to do
>this properly it would only show S Attwater and G Raggy as the other
>trainers have more than one horse.....

Looks like Jackson has only one horse too.
0
zzyzx__ (7)
2/13/2011 12:27:13 AM
After serious thinking Zz Yzx wrote :
>> What I want to do is filter the dataset on 'Trainer' so that it only
>> shows me the Trainers who feature once in the list. So if I was to do
>> this properly it would only show S Attwater and G Raggy as the other
>> trainers have more than one horse.....
>
> Looks like Jackson has only one horse too.

Actually there's 4 one horsemen!<g>

-- 
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


0
gs3102 (378)
2/13/2011 1:41:59 AM
Reply:

Similar Artilces:

Filters *SOS* Filters *SOS* Filters *SOS*
1) On formLoad, I need to show only those items which are unassigned. 2) I need for the end-under to select only the items they are assigned to. 3) I need an option to select "ALL" so I can view all items. Any insight offered would be appreciated!!! On Wed, 29 Aug 2007 16:24:01 -0700, valdaiway <valdaiway@discussions.microsoft.com> wrote: >1) On formLoad, I need to show only those items which are unassigned. Use a query to put a criterion on the field that defines the assigned status. I assume you know how that information is stored in your table; nobody here does, ...

Criteria for Advanced Filter HELP
I have what I think is a simple question that I need answered IMMEDIATELY. I have a spreadsheet with 20 fields and I want to filter it so it only shows records that have something in of any of 5 of those fields. So once filtered, I will not have any records that have all 5 of those fields blank. I know I have done this before but I'll be damned if I can remember or find out how. -- Thanks You all are teaching me so much don't cross-post -- answer supplied in misc NG "knowshowrosegrows" <knowshowrosegrows@discussions.microsoft.com> wrote in message news:ACBC0...

Employee Filters
Hello: On the employee filters in the HR Preferenes window, would this restrict seeing employee information in both Payroll and HR? Also, would it restrict reporting on certain employees in a division or department? Thanks! childofthe1980s Your message does not indicate which version of Great Plains you are using. Using 8.0 with SP3 applied, HR filters do apply to some of employee information outside of HR. The settings will filter selected forms, Smartlists and Lists items. The HR filter setting do not apply to reports outside of HR. The filtered forms are: Employee Maintenance,...

Filtering based on a filter
Hello, I have an Excel Worksheet with a Pivot Table at the top with a Filter and a data set returned from a DB2 database below it. I would like to filter the DB2 data set based on the Pivot Table filter that is enabled. Any ideas? Thanks! James, You can't filter two ranges on the same worksheet. You can, instead, drill-down on your pivot table, which will show all items that go into the value on a newly created separate sheet. The drawback to that is that you cna only drill down on one item at a time, and it is a separate sheet. HTH, Bernie MS Excel MVP "James" <an...

Question on the IMF filtering in exchange...
Hey I installed the IMF filter last night and it works great, with one exception. I set both thresholds to the same (5) and got almost all blocked emails into the archive that were junk...So that is good. However I had some users report that there was mail in their junk folder that should have been good Inbox mail. This I undersyand and can live with as folas-positives...the problem is, since both settings on the folter tab were set to 5, how does it know to send the mail to archive rather than Junk folder? Why wouldn't it just send them all to archive if both settings were at ...

Filtering without Filter
I just don't get the following. Any ideas? "A" row I have two different values I use: "Contact" and "Not a contact". "B" row I have the person's name (employee). "C" row I have a quantity, just one number. Now what I need is to output quantities of how many Contacts Employee1 or Employee2 or Employee3 have. Also what I need is to get the number of contacts - which can be found on row "C". Should I use COUNT.IF ? Row A can have 2 or more different values so should there be somekind of conditional IF function included? T...

Filtering #11
Hi, can ayone tell me how I could do the following in excel 2007 or 2010: Horse Trainer Sam M Jones John M Jones Colin S Attwater Steve J Jackson Brian B Mathers James B Mathers Martin G Raggy Patrick S Thomson What I want to do is filter the dataset on 'Trainer' so that it only shows me the Trainers who feature once in the list. So if I was to do this properly it would only show S Attwater and G Raggy as the other trainers have more than one horse..... Hopefully someone can help because it is driving me crazy !! Thanks David Give this macro a try... Sub HideDuplicateTr...

Junk filter BEFORE other filters?
I am running Outlook 2003 and the Junk filter was working really well. Then I started making other filters...one of them looks for my domain name in the headers and if it's there it moves the email to a folder. Problem is, this filter seems to activate before the junk filter, so the junk sn't being filtered now! How can I set the junk filter to do it's job first and THEN to run my own rules? -- Bryan Anderson <www.anderson-it.com> I created this rule and set it as the first rule to run: Apply this rule after the message arrives with 'X-Spam-Level:******'or'...

Pasting into a filtered list
Can anyone tell me if it is possible to paste a list of price updates into a filtered list. - I have filtered the list to show just the products whose prices need to be updated, when I try to paste the updated prices, into the list, the prices are not just pasted into the visible cells but the hidden cells between. Can I paste into the visible cells only or do I have to update each line manually. I am using Excel 2002 Any help would be much appreciated Can you sort the list to bring the products that need updating together in the list? If not, try something like this: Your list of product...

Macro to copy a VLOOKUP formula
Hello, I was wondering if somebody could help me with this macro… I have some data with a filter on, so that only the rows with blank cells are showing. I want to enter a VLOOKUP in the cell, and copy it down to all the blank cells. I tried just recording a macro, but when I run the macro it doesn’t work. Any ideas of how to do it? Example: 1) Before the filter: Colums A -B - C A x x - 1st Row A - 2nd Row A x x - 3rd Row A - 4th row A x x - 5th row 2) After the fil...

apply filter macro
I have a access db that works on win xp but does not work on win 2007 I have a combo box that triggers a apply filter macro using a query sort. no problem on win 2000 or win xp or win 2003 Help AlT ...

IP filtering based on corresponding MX records
Hello Dears, How can I implement the following? Used: Exchange 2003 SP2 in FE/BE configuration; FE is in perimeter zone (capable to “speak” with DNS, BE, DCs and retrieve info) So, somebody connects my FE to sent an e-mail to one of domain users. I need something like that: When connecting, see the “mail from: user@somedomain.xxx”; Verify if there is a record MX for the IP address from which the connection was established in DNS for the domain “somedomain.xxx” If not – drop connection (attention: MX record, not SPF) Is it possible with Exchange 2003 SP2 only? How? Thank you, Alex I be...

Month Filter
I keep a log of checks that I receive in my department throughout the year. I have the checks listed by date (mm/dd/yy), payee, check #, etc. What I want to do is be able to filter the list by month (ex., March 2005). Is there a way to do this? Thanks Joseph You can Try EasyFilter Joseph http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Joseph" <joe@nospam.com> wrote in message news:%23lQNnTawFHA.464@TK2MSFTNGP15.phx.gbl... >I keep a log of checks that I receive in my department throughout the year. I have the checks lis...

Dynamic Charts #11
I am trying to create a dynamic line chart. The data in column A is dates and the data in the header row (location) would be the series for the chart. The actual data is units. Problem is, more dates could be added as well as more locations. Is there any way to name the ranges to account for more or less data on both location and date? Hi: I repeat my answer to another question here again. There is an elegant solution, called "dynamic named range", that works with the OFFSET command. Search the web with this jargon, or check out Jon Peltier's website; it contains links...

filter for missing values in a range
I have a list in Col A ( about 2000) one to four digit numbers. I would like to ( for example) , in the 700's be able to filter and find out which of the numbers from 700 to 799 is NOT in the list. I know how to copy and paste to another col, etc. Thanks in advance for the wonderful help all of you give. One play .. Assume your source data runs in A2 down In B2: =IF(ROWS($1:1)+700-1>799,"",IF(ISNUMBER(MATCH(ROWS($1:1)+700-1,A:A,0)),"",ROWS($1:1)+700-1)) Copy B2 down by 100 rows to cover the full spread of numbers to be checked, ie # of nums from s...

Using a form in Excel to Filter
I would like to create a form in Excel that is similar to a form in Access. This form will hold all fields on the underlying spreadsheet and enable the user to sort using combo box dropdowns. Ideally, the form would have a button titled RUN that will take all the data the user selects in the combos and filter the underlying spreadsheet. Can this be done?? If so....you will save my life! TIA, Chris Try this Add-in http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl <ccfatzin@ibtco.com> wrote in message news:1122677766.648239.226910@z14g200...

Filtering
Is there a way to filter messages that contain embedded images? Or even better, messages that only contain embedded images and no text? thanks, Andy andyp@repcmi.com ...

filter driver for an USB modem
Hello, I am working on a NDIS filter under Windows 7 64 bits. The filter is working well as NetService Class with classical Ethernet Adapters. But, it does not work with an USB Modem with "Modem" class. Packets handled by the modem are not sent to the filter. How can I get them ? I suspect I should register the driver in another manner. Regards. Eric Boudrand > Packets handled by the modem are not sent to the filter. How can I get = > them ? I suspect I should register the driver in another manner. You need to support PPP in your filter, this requires ...

Reverse filter?
Hello, Is there a way to do a "reverse" filter. I'd like to be able to hide or delete rows that match specified criteria. Thank you, Marc Hi Marc, Unfortunately not, but depending on how you are filtering you might be able to use =NOT(oldformula) For the autofilter you might have to use another column (F) F1: 'white -- value of cell you don't want to match F2: =TRIM(F$1)<>TRIM(E2) and fill down --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel...

Data Filter Question
When I am trying out different data filter criteria, is there an easy and fast way to go back to displaying *all* data without clicking on the drop arrow and selecting All? I am using Excel 2003. Thank you. I've added an icon to my favorite toolbar: Tools|Customize|Commands tab|data category Drag the "Show All" (and maybe autofilter) icon to a toolbar. john.menken@ceridian.com wrote: > > When I am trying out different data filter criteria, is there an easy > and fast way to go back to displaying *all* data without clicking on > the drop arrow and selecting All? ...

Extra lines in pasted notes 11-14-06
Hello, We are new CRM version 3 users. We like to paste notes into accounts and cases from other sources. We are finding that the carriage returns are doubled when pasting -- wherever there is a single space in the source document, it becomes a double-space in the notes area. What are we doing wrong? If nothing, is there a work-around or a way to change this? Thanks in advance for your help. -- Laura Barber Barbara, I wasn't able to replicate this behavior. I was using Microsoft Word and was pasting into the notes section against Opportunity. Can you give more specifics inc...

Filtering Low Cardinality Columns on SQL 2005
I have a view which is a 5 table join. One of those tables is 1.5million rows. When doing select on this view, the conditions are as follows: 1. compare if equal a column to a literal, with 2 distinct values, 2. compare if equal column to a literal, with 5 distinct values, 3. compare if equal column to a literal, with329 distinct values, 4. compare if less than date column to literal, with 1.2 distinct values All of the above columns are from the large table, mentioned above. This table has a compound primary key. Looking at explain plan, an index scan is being performed ...

Advanced Filter #4
I used advanced filter to combine duplicate rows into a unique row. However, the duplicate rows are still there. If you go to the Data menu and click Show All, the duplicate rows are displayed again. My question is, after filtering out the duplicate rows, how do I get rid of them, not just hide them? Greg, Use "copy to" instead of "filter in place." The copied-to is your unique list. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Greg" <gwikle@triad.rr.com> wrote in message news:OpvFHg...

Junk filter not filtering!
Hi, I'm having problems with the junk email filter. It's set on high protection, but none of my emails are getting filtered. What seems to be happening is that junk email is received, sent to the junk mail folder, but then immediately moved to one of my other folders as specified in one of my other 7 custom e-mail filtering rules that I have created. I use the custom email filtering rules to sort out emails received from different accounts into different folders, so what I really need is that either the junk email filtering kick in after all the custom rules have been processed or els...

Edit/Add to E-Mail Filter
Is there a way to add to or edit the info in the junk e- mail filter for outlook? McCue <bobbie@midcogen.com> wrote: > Is there a way to add to or edit the info in the junk e- > mail filter for outlook? Nope. You can add to the Junk Senders list, however. -- Brian Tillman ...