+ Reply to Thread
Results 1 to 8 of 8

Filter matrix based on a non-exact match

  1. #1
    Forum Contributor
    Join Date
    10-31-2008
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    108

    Question Filter matrix based on a non-exact match

    I would like to make an average of the numbers in column B that matches a criteria on column A. The problem is that is not an exact match.

    The names below are on column A:

    VW Gol 10/11 - AADDD
    FIAT Strada 09/10 - HHH3456
    FORD Fox 08/09 - ZZZ3333
    VW Gol 13/13 - FRT4444
    FORD Fox 02/02 - RRR4444

    Column B contains numbers.

    I want an average of numbers that match VW Gol and FORD Fox etc. All of them. Which means excel need to ignore what comes later and gather all the numbers and make an average. The problem is that what comes later is not in a defined number of characters. Is it possible?
    Last edited by douglascaixeta; 03-31-2013 at 04:41 PM.

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Filter matrix based on a non-exact match

    You could try using something like SEARCH("VW Gol*",A1) (or find) or something like that ...

    EDIT-
    no specific formula, because, no specific data
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Filter matrix based on a non-exact match

    Hi

    assuming your data is in A1:B5 - I put VW Gol in A10 and Ford Fox in A11. Then in B10, I used this, and copied it to B11...

    =AVERAGEIF($A$1:$A$5,A10&"*",$B$1:$B$5)

    Adjust ranges as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Filter matrix based on a non-exact match

    try this macro, type in the desired partial match in A1 and run it

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-31-2008
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    108

    Re: Filter matrix based on a non-exact match

    @dredwolf : I don't know what to do with this. It will give me back the position of the text in the field. Doesnt really help.

    @FDibbins: unfortunately no. The actual data is more than a thousand records.

    @rcm: I don't know how to run this.


    There are no formula that will give back all the cells that contains the given text?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Filter matrix based on a non-exact match

    The qty of records is irrelevant, just extend the range to cover as needed.

    =AVERAGEIF($A$1:$A$1000,A10&"*",$B$1:$B$1000)

    There are no formula that will give back all the cells that contains the given text?
    Thats what A10&"*" does

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Filter matrix based on a non-exact match

    the search option would be used within a larger formula, which I did not give because I had nothing to work with, But FDibbins solution seems to cover it so no need to use the search optiion

  8. #8
    Forum Contributor
    Join Date
    10-31-2008
    Location
    Brazil
    MS-Off Ver
    Office 365
    Posts
    108

    Re: Filter matrix based on a non-exact match

    Yes FDibbins, that works perfectly. I found that solution just know. I understood that you meant to filter the data and set different ranges per formula.

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1