+ Reply to Thread
Results 1 to 6 of 6

Formula to retreive data into a sheet - Database vlookup or if analysis

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    san jose
    MS-Off Ver
    Excel 2010
    Posts
    15

    Formula to retreive data into a sheet - Database vlookup or if analysis

    I am having trouble with pulling up data from another sheet.

    On the attached Excel file, I have 3tabs:

    Master_List
    H_Codes
    Lab_match

    In the lab_match tab, I want to be able to insert a group of chemicals in Columns A and B i.e. cas numbers and chemical name and be able to auto fill the rest of the Columns C to I. I have been able to use the Vlookup formula in C, D, E and F to obtain what I need there. The output for C, D, E and F comes from the Master_List Tab.

    Problem: Depending on the H-Codes produced in Column C in the lab_match Tab (via Vlookup from Master List Tab), I would like to compare those multiple codes to the data in the H_Codes tab and provide an output into columns G, H and I.

    So example C2 contains the code H301, then G2 should contain "Toxic if swallowed", H2 should contain "Acute toxicity, oral (chapter 3.1)" and I2 should contain "3". C2 also contains other H-codes e.g. H315, H318, H401 and the outputs of these should also be within G2.

    Please help!
    Report from Chemffx.xls

  2. #2
    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
    53,048

    Re: Formula to retreive data into a sheet - Database vlookup or if analysis

    Hi and welcome to the forum

    This is an excel question, not an access question< i will move it to the approritate forum
    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

  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
    53,048

    Re: Formula to retreive data into a sheet - Database vlookup or if analysis

    There is no easy way to give you what you want, using regular formulas (maybe some-one can put some VBA together for you)

    The way I would tackle this, would be to add a series of helper columns off to the side, to break out each of the codes, look up each of those, and then put the answers back together again.

    If this something you think you can work with, let me know and we can start working on it?

  4. #4
    Registered User
    Join Date
    02-28-2013
    Location
    san jose
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Formula to retreive data into a sheet - Database vlookup or if analysis

    Quote Originally Posted by FDibbins View Post
    There is no easy way to give you what you want, using regular formulas (maybe some-one can put some VBA together for you)

    The way I would tackle this, would be to add a series of helper columns off to the side, to break out each of the codes, look up each of those, and then put the answers back together again.

    If this something you think you can work with, let me know and we can start working on it?
    Can we try your proposed method with helper columns? I have no knowledge of vba either and would need help for this.

  5. #5
    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
    53,048

    Re: Formula to retreive data into a sheet - Database vlookup or if analysis

    Take a look at the attached. I have make provision for 10 codes in C, if you need more, add extra columns between 9 and 10 in each "set", then copy the formula from 9 across. Do the opposite if you want to remove columns - delete 9,8,7 etc, then copy the formula from 2 across

    (I know its a beast, but it gives you what you want)
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-28-2013
    Location
    san jose
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Formula to retreive data into a sheet - Database vlookup or if analysis

    This is great! Thank you! I will try to use it with the team..thanks again!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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