+ Reply to Thread
Results 1 to 6 of 6

Return cell contents on a partial match

  1. #1
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Question Return cell contents on a partial match

    Howdy and thank you in advance...

    I have a data page that lists the name of individuals under a region Prior YTD, current YTD. The names of the regions can change occassionally and not all are entered in the same format

    E.g.

    Region
    NORTH.PRIOR YTD
    NORTH.YTD
    MR SMITHS.PRIOR YTD
    MR SMITHS.YTD

    What I need to know is this.
    HOW do I search the DATA page to find each of the "North" entries (up to four of them, usually one beneath the other on the "Data" sheet) and copy the name AS IT APPEARS on the Data sheet to the named "North" sheet?

    Currently I have two columns one with the Region and one with the name of the company that goes with that particular region.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    You could use AutoFilter with the custom filter Contains "north" (no quotes).

    If you want a spreadsheet formula,
    Put this in row1 of the sheet "North" and fill down.

    =INDEX(Data1$A$2:$A$11,SMALL((100-(99*--(SEARCH("north",Data1$A$2:$A$11&"north")<LEN(Data1$A$2:$A$11))))*ROW(Data1$A$2:$A$11),ROW()),1)

    This is an array formula entered with Cmd+Return (Windows version, Ctrl+Shift+Enter)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Exclamation

    Thank you for your speedy reply,

    I did as you have suggested (changing the references of course to match my workbook), however it didn't work. I have attached an example to show the kind of data and the named sheets and results that I would like to get.

    I would be grateful for ANY suggestions.....
    Attached Files Attached Files

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    In sheet Canberra, use this formula in all cells in columns A:F.

    =INDEX(Data!$A:$F,SMALL((100-(99*--(SEARCH("canberra",Data!$A$1:$A$200&"canberra")<LEN(Data!$A$1:$A$200))))*ROW(Data!$A$1:$A$200),ROW()),COLUMN())

    Change the two constant strings to "sydney" for the other sheet, as in the attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-14-2005
    Posts
    69
    Thank you again...however it isn't working. The result I got was zero..literally 0 in the cell.

    Sheesh...maybe this won't work.

  6. #6
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Exclamation

    Is there anyone that has a solution to this issue? It is urgent that I find an answer. I just want a formula to search and return a "partial" match on a list.

    I have tried the offered formula in the sample workbook, works fine in there. But the minute I transfer it to my book, (changing the cell references of course) and YES I did control, shift + enter after editing) but it still will not work no matter what I do.

+ 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