VLOOKUP for Times, Not Matching based on rounding?

ARW17

Board Regular
Joined
Oct 31, 2016
Messages
109
I'm having a problem getting a VLOOKUP to work where Excel thinks the times 3:45 PM and 3:45 PM don't match. Both are formatted H:MM AM/PM.

When I evaluate the formula it shows that one is 0.65625 and the other is 0.65624999999999.

The one it marks as 0.65625 is generated from the formula:

{=IF(VLOOKUP(B80,'S-S Staffing'!A:G,7,FALSE)<>"",VLOOKUP(B80,'S-S Staffing'!A:G,7,FALSE),IF(ISNA(INDEX('Daily Setup'!$E$17:$E$158,MATCH($B80&$E$1,'Daily Setup'!$D$17:$D$158&'Daily Setup'!$E$17:$E$158,0),MATCH(I$2,Staffing!$D$2:$J$2,0))),INDEX(Staffing!$N$2:$T$245,MATCH($D$1&$B80,Staffing!$A$2:$A$245&Staffing!$M$2:$M$245,0),MATCH(I$2,Staffing!$D$2:$J$2,0)),INDEX('Daily Setup'!$F$17:$F$158,MATCH($B80&$E$1,'Daily Setup'!$D$17:$D$158&'Daily Setup'!$E$17:$E$158,0))))}

The one it marks as 0.65624999999999 is just text: 3:45:00 PM.

How can I fix this?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hello, have you tried using the =Round() function? so =vlookup(round(x,6),z:az...and so on. that assumes the array function is always pulling to the sixth decimal point
 
Upvote 0

Forum statistics

Threads
1,216,131
Messages
6,129,066
Members
449,485
Latest member
greggy

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