+ Reply to Thread
Results 1 to 8 of 8

Is this possible? How? 2 sheets/2 variables

  1. #1
    Registered User
    Join Date
    02-10-2007
    Posts
    4

    Is this possible? How? 2 sheets/2 variables

    I have column A with product code numbers on it and column B with price on one sheet 1.

    On sheet 2, i have column A with the product codes (not in the same order as sheet 1) and on column B the quantity available in stock.

    I would like to evaluate my stock, so i would like for Column C in sheet 2 to go get the price (column B in sheet 1) according to the product code number (column 1). Keep in mind column A in the two sheets are not in the same order.

    Thanks so much for your help.
    Attached Images Attached Images
    Last edited by Nadjim; 02-10-2007 at 06:09 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Take a look at this link on VLOOKUP

    http://www.contextures.com/xlFunctions02.html
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    02-10-2007
    Posts
    4
    okey so i'm using
    =LOOKUP($A2,Sheet1!$A$1:$A$20,Sheet1!$B$1:$B$20)

    but i get error messages still. I checked everything a few times and it seems to be all in check.

    Can anyone throw a bone at me? could i maybe email it to one of you gents?

    Thanks in advance.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Did you mean to use VLOOKUP? (Not just LOOKUP). If you're trying to return the value from column B of sheet1 into column C of sheet 2, then use VLOOKUP.

    Try this in C2 of Sheet2 (and fill down as many rows as necessary):

    =VLOOKUP(A2,Sheet1!$A$2:$B$20,2)

    This formula will look up the value of A2 (Sheet2) in Sheet1!A2:B20. The final "2" tells it to retrieve the value in the "2"nd column of your search range (A2:B20).

    *** Column A on Sheet1 should be in ascending order for this to work, if I'm not mistaken, otherwise the VLOOKUP formula could fail.

    *** The $'s in the VLOOKUP formula will ensure that as you fill the formula down many rows, the lookup range will not change.

  5. #5
    Registered User
    Join Date
    02-10-2007
    Posts
    4
    hmmm....i seem to get an error on this one. I'm trying to figure it out

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    If you'd like, post your spreadsheet (with demo data if you have privacy concerns) and i'll take a look.

    I tested the formula on a sheet I just put together and it works just fine.

    Thanks.

  7. #7
    Registered User
    Join Date
    02-10-2007
    Posts
    4
    Could i email it to someone? I am currently in a delicate situation and this is driving me crazy...

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    To post a zipped example here, go to “My Documents” or wherever you have your file stored, right-click and “Send to > Compressed file”, then attach this to your post

+ 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