+ Reply to Thread
Results 1 to 2 of 2

Adding variables

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151

    Adding variables

    Hi

    I have 2 tabs.

    The first tab includes the following data

    Product Code
    NO*929125923
    ESB35107911
    ZA*894038981
    NO*929125925
    NL201442890000
    GB00424948
    GB00884749


    The second tab has more detail

    Product Code Total Assets1997 Total Assets1998
    NO*929125923 234 25
    ESB35107911 24
    ZA*894038981 356 245
    GB00884749 5356 23
    GB004806293 356 25
    GB02352403 36 2354

    I need a formula in the first tab that searches for the product code and then puts in total assets. So my 1st tab would look like:


    Product Code Total Assets1997 Total Assets1998
    NO*929125923 234 25
    ESB35107911 24
    ZA*894038981 356 245
    NO*929125925 0 0
    NL201442890000 0 0
    GB00424948 0 0
    GB00884749 0 0


    In reality there are lots of product codes!

    Thanks for your help!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Adding variables

    cj21,

    What you're looking for is the VLookup() formula. Attached is an example workbook based on the sample data you provided. In Sheet2 is the more detail. In Sheet1 are the product codes with the vlookup() formulas to pull information from Sheet2. Assuming Sheet1 and Sheet2 have the same headers like in your sample data, then in Sheet1 cell B2, you can use the following formula:
    =IF(ISNUMBER(MATCH($A2,Sheet2!$A:$A,0)),VLOOKUP($A2,Sheet2!$A:$C,MATCH(B$1,Sheet2!$1:$1,0),FALSE),0)

    Then just copy over and down

    Hope that helps,
    ~tigeravatar
    Attached Files Attached Files

+ 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