Help writing a VLOOKUP formula

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
740
Office Version
  1. 365
Platform
  1. Windows
Hello

Could you please help me write a VLOOKUP formula
what i am after is if D5 cell is greater than the range of any B13 - O13 then the result is the next value

Results in F4, F6, F8

Hope this makes sence
many thanks

Jay
 

Attachments

  • Screenshot 2021-03-13 075826.jpg
    Screenshot 2021-03-13 075826.jpg
    115.6 KB · Views: 13

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Just regular lookup would work better for that.
Excel Formula:
=LOOKUP($D$5,$B$13:$O$13,$B14:$O14)
As you have decided to merge some of the cells the formula will break if you try to fill down, you will need to edit each one with the correct result row.

Please use XL2BB for posting your examples. Even with simple questions, screen captures are relatively useless. We can't view the image and type a reply at the same time, we have to keep clicking in and out of the image to check the details.
 
Upvote 0
Thank you Jason
that works as a look up but returns the wrong value, if my result is greater than the lookup give that as my result

0.15 and my answerr is 0.152 then select the next lookup
does that make sense

=LOOKUP($D$5,$B$13:$O$13,$B14:$O14)
D5 result is B5*B7/1000000
 
Upvote 0
Sorry, I didn't notice that part. It is preferable to have the lower limit in the the top row rather than the upper limit, 0 in B13, 0.0051 in C13, 0.011 in D13, etc.

It would also be advisable to add an extra column at the end for 1.0001 for anything exceeding the limits in the last column.
 
Upvote 0
Another option would be to use Xloookup
Excel Formula:
=XLOOKUP($D$5,$B$13:$O$13,B14:O14,"",1)
 
Upvote 0
Thank you so much Jason and Fluff you are stars :)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Hello Fluff / Jason

Could i please ask another favor

how would i change the formula in G8 ( =XLOOKUP($F$8,$B$1:$O$1,B2:O2,"",1) to look up the value in cell C8 but change my range to B2:O4
is that an index match query or is it still an xlookup?

Thank you
 

Attachments

  • Screenshot 2021-03-20 190629.jpg
    Screenshot 2021-03-20 190629.jpg
    132.1 KB · Views: 2
Upvote 0

Forum statistics

Threads
1,213,522
Messages
6,114,112
Members
448,549
Latest member
brianhfield

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top