+ Reply to Thread
Results 1 to 13 of 13

Thread: Vlookup range

  1. #1
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Vlookup range

    I have a example workbook of what I would like to do if its possible. If I pick a item in my validation list I want it to
    put the price of it in the next column with the item.


    Thanks Z
    Last edited by zplugger; 12-13-2011 at 07:05 PM.

  2. #2
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,521

    Re: Vlookup range

    VLOOKUP is explained quite clearly in the Excel Help file.

    In cell C2
    =VLOOKUP(B2,Sheet2!A1:B5,2,FALSE)
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Valued Forum Contributor MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5,285

    Re: Vlookup range

    Hi zplugger,
    Look at the attached for an example and formulas.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * below to say thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    Thanks Guys, I will look at the example and try to understand how it works. Not sure if this is the way to go, if valitation put in the price will I be able to change it sometimes?.Lets say a item is .89 and for a certain time I want it .93.I will play around a little with these questions. If I have 100 cells with valdation
    will I have to copy formula to every cell,will it erase if I change the amount.
    Z

  5. #5
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    Ok I undersand how Vlookup works some what,my question is how do I make the cells in column c,d just show $0.00 when there is nothing in column b. Is there a way to put vlookup code in the worksheet so I could change a amount in column c? If I do it now its deletes the code. I have a range of about 100 product cells on sheet1,can one code cover them all. Here is a new example.
    Thanks

  6. #6
    Registered User
    Join Date
    11-03-2011
    Location
    Shelton, CT
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Vlookup range

    See Attachment.... you cannot type in a cell that contains a formula without erasing it. I have explained options in the attachment. if you code in a 0.00 then you will 0.00 in every cell you have pasted the formula. just replace "" in the formula with a 0 and it will put 0.00 instead of a blank line.
    Attached Files Attached Files
    Last edited by optomyst; 12-12-2011 at 02:36 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    Thanks optomyst, I think I can make that work.
    Z

  8. #8
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    So there is no way to put the formula in a cell range in vba? so if you did change it the next
    time you open the workbook the formula would be back?

  9. #9
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    Would it be possible to put the formula that is in c2 in another hidden cell like J2?.So the next time you
    open the sheet it would default back to the value in J2. Not sure how to make C2 value the same as J2
    when you open the sheet?

  10. #10
    Registered User
    Join Date
    11-03-2011
    Location
    Shelton, CT
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Vlookup range

    I added an Override column so you have the option of changing the look up value. If you put anything in column E, it will override. If you erase the value it will default back to the look up value.
    Attached Files Attached Files

  11. #11
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    Thank You optomyst, I almost gave up. I"ve been playing around for days and could not find a way with
    the existing form. This will work with some changes to my form. I just need to find a way to hide the extra column
    when I print the page. If I can do that I know this will work perfect.
    Again Thank You
    Z

  12. #12
    Registered User
    Join Date
    11-03-2011
    Location
    Shelton, CT
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Vlookup range

    set your print area to omit that column or move it outside your print range.. that should make it easy

  13. #13
    Valued Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    349

    Re: Vlookup range

    Thanks again optomyst, you had some great suggestions. I going to
    move it outside the page.
    Thanks Z

+ 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.2.0