+ Reply to Thread
Results 1 to 4 of 4

i have problem in VLOOKUP function

  1. #1
    Registered User
    Join Date
    05-12-2009
    Location
    Egypt
    MS-Off Ver
    Excel 2003, 2007, 2010 and 2013
    Posts
    56

    Red face i have problem in VLOOKUP function

    When using Vlookup
    Example:

    A B
    1 5
    2 6
    3 7
    4 8
    5 9
    If I use vlookup(2.7,a,2,true) I get 6. but i need the average between 6 and 7 (i.e. (6+7)/2=6.5)
    Can this be done?
    Thank you.

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: i have problem in VLOOKUP function

    try this formula
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Contributor
    Join Date
    08-26-2009
    Location
    Iceland
    MS-Off Ver
    Excel 365, Windows 10
    Posts
    110

    Re: i have problem in VLOOKUP function

    in cell a1 to b6 I have your table.
    in cell b9 I enter my value
    in cell b10 I calculate my exact value, using rounddown. =ROUNDDOWN(B9;0)

    In cell c9 I use vlookup. In this case I have to find vlookup of 2 + vlookup of 3 /2

    =(VLOOKUP(B10;A2:B6;2;FALSE)+VLOOKUP(B10+1;A2:B6;2;FALSE))/2


    In summary, you can combine these two step in one.
    In cell c9 you put this formula:
    =(VLOOKUP(ROUNDDOWN(B9;0);A2:B6;2;FALSE)+VLOOKUP(ROUNDUP(B9;0);A2:B6;2;FALSE))/2

  4. #4
    Registered User
    Join Date
    05-12-2009
    Location
    Egypt
    MS-Off Ver
    Excel 2003, 2007, 2010 and 2013
    Posts
    56

    Re: i have problem in VLOOKUP function

    very good
    thank you very much

+ 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