Find a value in a table greater than the one I am searching
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Find a value in a table greater than the one I am searching

  1. #1
    Guest

    Default

     
    I am taking a value from one cell and using Vlookup trying to find a value in a table which is greater than it. Vlookup always defaults to a lower value than the one I want!

    Is there an IF function to attach to the Vlookup code to get the next value along, or is there a different approach that anyone can suggest?

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You could use...

    =OFFSET($B$1,MATCH(A1,$B$1:$B$6,0),1)

    ...where your lookup table consists of 2 columns beginning in cell B1. Suppose your table contained...

    {1,"A"
    ;2,"B"
    ;3,"C"
    ;4,"D"
    ;5,"E"
    ;6,"F"}

    ...and cell A1 contained 2. This formula would return "C".

  3. #3
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    But zero as the Match_Type argument for match means find and exact match, so if the number doesn't exist you get the dreaded N/A



User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com