Match with #value error

longstick

New Member
Joined
Nov 19, 2011
Messages
42
Thank you in advance for any help you can provide.

Code:
{=IF(B2="OK","",MIN(ABS(B3-INDEX($B$1:$K$1,0,MATCH(MIN(ABS(B3-$B$1:$K$1)),ABS(B3-$B$1:$K$1),0))),ABS(INDEX($B$1:$K$1,0,MATCH(MIN(ABS(B4-$B$1:$K$1)),ABS(B4-$B$1:$K$1),0))-B4)))}

Above is the code I am using to find the closest time checked to the check windows listed below that are being audited.
Once the closest time is found then I check the difference between the two.

All of the "Time When Checked" cells will contain a formula. It will either show a time or be blank but not empty. The cell will always have a formula in it.

I am receiving a #value error when the formula encounters the cells that have formulas in them but a value of "".
The data will always be listed left to right. The check times might not be in order of earliest to latest. And, any cells with no values will always be on the right side.
Time When Checked6:427:208:0010:1510:1811:4412:2113:1414:2915:07
NGOKOKNGOKOKOKOKOKOK
Start Window6:207:108:009:1010:0011:3012:2013:1014:1515:05
End Window6:407:308:209:3010:2011:5012:4013:3014:3515:25
Check Formula0:020:45

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,214,902
Messages
6,122,161
Members
449,069
Latest member
msilva74

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