Results 1 to 5 of 5

Thread: Filtering help

  1. #1
    3 Star Lounger Jimmy-W's Avatar
    Join Date
    Jan 2001
    Location
    Helena, Montana, USA
    Posts
    220
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Filtering help

    I have a spreadsheet in Excel 2010 with two text columns: Name and Path. Name contains 70 records, with data such as 15 books on shelf. Path contains 500 records. An example record from Path is c:\users\joe\pictures\file_name. I want to create a filter to find any Path records that include a file name in Name. I'm having trouble, I think, because the Path field contains more characters and will never exactly match a record in Name. I tried inserting an asterisk (*) on front of every record in Name, but that didn't work. I guess that I need something like "find records in Path that include text in name." Thanks.
    JimmyW
    Helena, MT

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Jimmy,

    I'm not exactly how your data is showing but you could try adding another column with the formula:
    =IF(AND(A2<>"",B2<>""),TRUE,FALSE)
    and copy it down the column then autofilter on True.

    Note: this assumes that Row 1 contains Labels for the columns.
    Attached Images Attached Images
    Last edited by RetiredGeek; 2011-11-19 at 20:07.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Jimmy,

    Actually, a direct filter will work if you Select Custom for Name and Is Equal to * then do the same for Path it will work.
    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    In a filter you could use the "contains" item in the pulldown...

    Steve

  5. #5
    3 Star Lounger Jimmy-W's Avatar
    Join Date
    Jan 2001
    Location
    Helena, Montana, USA
    Posts
    220
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Thanks very much! I'll tell you what I ended up doing, which seemed to work. I attached a screen shot. C1 is my criteria field and contains the records in A1. I did =Replace, twice, to insert an asterisk at both ends in C1. Then, I did an advance filter: List Range=$A$1:$B$19, Criteria Range=$C$1:$C$7, Copy To: $D$1. I'm sure there are better ways, probably as you suggested, but I was a little challenged about using the Contains function. I wanted to produce path records that contain the text in the file field. I didn't see how to use the Contains dropdown filter in B1 to produce records that contain the text in A1. Maybe I explained it poorly in my post, or I'm just not catching on .
    Attached Images Attached Images
    JimmyW
    Helena, MT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •