+ Reply to Thread
Results 1 to 10 of 10

Search for cross reference value within a cell

  1. #1
    Registered User
    Join Date
    04-13-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    29

    Search for cross reference value within a cell

    Hi all,

    I have a problem I can't work out. I have a worksheet (colours!) containing general references that look something like this (except much bigger):

    A
    BLUE
    GREEN
    RED
    PINK
    ORANGE
    PURPLE
    BLACK
    WHITE
    YELLOW
    BROWN

    B
    bl
    gr
    re
    pi
    or
    pu
    bl
    wh
    ye
    br

    C
    the sky
    a leaf
    blood
    panther
    fruit
    rain
    gold
    knight
    sun
    dog

    My main worksheet contains a column (lets say Main! column D) that contains reference numbers in the format e.g. 10/pu/67. The format is generally the same. There are a very few references that aren't in this format. What I want is a formula that will look at the entry into Main!D, identify the common value in Colours! Column B and fill in corresponding values in Main!E to match Colours!A and Main!:F to match Colours!C.

    So in the example of 10/pu/67 above, the result would be

    Main!D Main!E Main!F
    10/pu/67 PURPLE rain

    I've come close with some lookup and search functions, but so far no luck. The talent around here seems to be much better than the one writing this post.

    I've think I've followed the rules, but feel free to smack me if I've missed something.
    Last edited by Homeslice01; 07-16-2013 at 03:19 AM. Reason: Formatting correction

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Search for cross reference value within a cell

    Can you upload example workbook with your input and desired ouput?

    make sure to avoid private informations.


    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Registered User
    Join Date
    04-13-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Search for cross reference value within a cell

    Example.xlsx

    Thanks Zbor,

    In a nutshell, based on Main! column D and Colors! column B - Solve for Main! E & F.

    I know it's possible, but I'm getting older trying to get it right.

  4. #4
    Forum Contributor
    Join Date
    07-16-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    176

    Re: Search for cross reference value within a cell

    hope this is what you're trying to do.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-09-2011
    Location
    BSB
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Search for cross reference value within a cell

    For color column, try this formula

    =INDEX(Colors!$A$2:$A$11,MATCH(TRIM(LEFT(MID($D2,FIND("/",$D2)+1,3),MIN(FIND({0,1,2,3,4,5,6,7,8,9,"/"},MID($D2,FIND("/",$D2)+1,3)&"0123456789/"))-1)),Colors!$B$2:$B$11,0),0)

    For quality column, try this formula

    =VLOOKUP(E2,Colors!$A$2:$C$11,3,FALSE)

  6. #6
    Registered User
    Join Date
    04-13-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Search for cross reference value within a cell

    Thanks igoodable.

    It's great.

    Is there a way of changing it slightly so that instead of looking within the "/"s for a value, the value itself is found? I only ask, because these references are not always generated at my work and sometimes have a slightly different format.

  7. #7
    Forum Contributor
    Join Date
    07-16-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    176

    Re: Search for cross reference value within a cell

    the key part of the formula is to identify the "pu" from 10/pu/67, so if "pu" is always the 4th character, you can replace the entire find formula with a number 4. =INDEX(Colors!$A:$A,MATCH(MID($D2,4,2),Colors!$B:$B,0))

  8. #8
    Registered User
    Join Date
    04-13-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Search for cross reference value within a cell

    Thanks again.

    It's close to what I'm looking for, but the input references are a bit too inconsistent for this formula. I may have to play around with it to get it to work properly. You've given me a few ideas to try.

    Cheers.

  9. #9
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Search for cross reference value within a cell

    Try:

    Main!E2,

    =LOOKUP(9.9E+300,SEARCH(Colors!B$2:B$11,D2),Colors!A$2:A$11)

    Main!F2,

    =LOOKUP(9.9E+300,SEARCH(Colors!B$2:B$11,D2),Colors!C$2:C$11)

    Should work as long as a value in D2 from Reference cue column in Colors tab.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  10. #10
    Registered User
    Join Date
    04-13-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Search for cross reference value within a cell

    Oh Haseeb!

    You're a total machine! That's genius. I had worked it out using a massive formula but this is simplicity and elegance.

    Bravo.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Cross reference with multiple instances in reference data
    By Nick F in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-08-2013, 10:31 AM
  2. How do I use the cross reference in a cell rather than the value this enters?
    By Zarathrustra in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2012, 11:26 AM
  3. Cross reference/cell update question
    By budfox in forum Excel General
    Replies: 4
    Last Post: 02-21-2011, 10:17 AM
  4. cross reference to another cell
    By gribster in forum Excel General
    Replies: 1
    Last Post: 09-14-2010, 05:42 AM
  5. Cross Reference
    By Terrance DeBord in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-08-2006, 12:15 PM

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