+ Reply to Thread
Results 1 to 7 of 7

vlookup with a twist.. ?

Hybrid View

  1. #1
    Registered User
    Join Date
    06-27-2008
    Location
    Sweden
    Posts
    8

    vlookup with a twist.. ?


    Ok, here goes...
    I have a pricelist with a bunch of sheets and need to update the value if the workbook contains another value fot that material.

    Example:

    Sheet10

    Material Price

    123456 8€

    I would like to update the price if sheet one contains this material.

    To summorize; i would like to update the price in the pricelist but only if the material/ price is in "sheet1" otherwise leave as is.

    Cheers, St0ffe

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    i would like to update the price in the pricelist but only if the material/ price is in "sheet1" otherwise leave as is.
    You can't do this as you request unless you apply VBA....

    One way to do it without VBA is to add another column with a formula only.

    e.g. =if(Isnumber(Match(A1,Sheet1!A:A,0)),Vlookup(A1,Sheet1!A:B,0),B1)

    Where A1 is your Material and B1 is the current price...

    The formula would be put in C1 and copied down.

    Sheet1!A:B contain the listing of materials and prices.

    The original column containing the original price can be hidden if desired
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-27-2008
    Location
    Sweden
    Posts
    8
    Thanks, works perfectly!

    I can sleep again...

  4. #4
    Registered User
    Join Date
    06-27-2008
    Location
    Sweden
    Posts
    8
    Just curious, how would the VBA code look?

    Thank again, -St0ffe-

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I am not a VBA coder....

  6. #6
    Registered User
    Join Date
    06-27-2008
    Location
    Sweden
    Posts
    8
    ok, thanks anyway

+ 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