conditional vlookup

  • Thread starter Thread starter jpx
  • Start date Start date
J

jpx

I am trying to use vlookup to return a value, in a specified column,
only if it meets a certain condition. For example in the list below I
want to search for test2 and return the itme in column 2. Currently
if vlookup search's for test2, it takes the first time it appears, and
returns the corresponding column entry, in this case "1". I want it to
keep looking until the value in column two is greater than say 4. IE
how can I search for test2 in this example and return 5. I have tried
to embed if then statements but have failed so far? Thanks

Test1 2
Test1 3
Test1 4
Test2 1
Test2 2
Test2 3
Test2 4
Test2 5
Test2 6
Test2 7
 
Try this:
If your original array begins in cell A1

=IF(VLOOKUP(A1,A1:B10,2,FALSE)>4,VLOOKUP
(A1,A1:B10,2,FALSE),"")
 
Back
Top