INDEX MATCH lookup if between two times

DDT~123

Board Regular
Joined
May 31, 2012
Messages
220
Hello All,

I have the below formula which works if the lookup value is BETWEEN a minimum and maximum value but doesn't work if the value is EQUAL TO a minimum value.


{=IFERROR(INDEX(Goals!$A$12:$A$16,MATCH(1,(E9<=Goals!$D$12:$D$16)*(E9>=Goals!$C$12:$C$16),0)),"")}


Goals!$A$12:$A$16 - This is the range that i want to be output (numeric value)
E9 - The value that i want to lookup (time value)
Goals!$D$12:$D$16 - This is the range which has the maximum values (time value)
Goals!$C$12:$C$16 - This range includes the minimum values (time value)


These are the values i have in Goals!$C$12:$D$16
[TABLE="width: 172"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Min[/TD]
[TD]Max[/TD]
[/TR]
[TR]
[TD]0:08:02[/TD]
[TD]2:00:00[/TD]
[/TR]
[TR]
[TD]0:07:41[/TD]
[TD]0:08:01[/TD]
[/TR]
[TR]
[TD]0:07:20[/TD]
[TD]0:07:40[/TD]
[/TR]
[TR]
[TD]0:06:59[/TD]
[TD]0:07:19[/TD]
[/TR]
[TR]
[TD]0:00:01[/TD]
[TD]0:06:58[/TD]
[/TR]
</tbody>[/TABLE]


I'm receiving an error when the lookup value in E9 is 0:08:02


Any help would be greatly appreciated.
 
Then you have milliseconds in C12 i believe. Try retyping it into the cell and you should see your formula produce a result rather than an error (blank)

That worked! How would I get the proper number without the milliseconds? The cells are formatted with 37:30:55
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try using this:

=FLOOR(C12,1/86400)

Drag it down and across. Copy it and paste special values over your times.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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