Comparing Time

30percent

Board Regular
Joined
May 5, 2011
Messages
123
Office Version
  1. 2016
Platform
  1. Windows
Hi,


SubjectTime 1Time 2Check Time
Subject 104:0003:00FALSE

I have formula =TEXT(VLOOKUP(B47,'Paste'!$A:$E,2,FALSE),"HH:MM") in cell B2 and =TEXT(VLOOKUP(A47,'Eastern Time'!$A:$I,3,FALSE),"HH:MM") in cell C2 and =MINUTE(ABS(D47-C47))>1 in cell D2.

I expect cell D2 to return TRUE.
If I make a small change to the formula in D2 to =MINUTE(ABS(D47-C47)) it would result in 0. How could that be? What am I missing?

Thanks
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
whats value on cell D47 and C47 ?
Sorry the formula should be:

=TEXT(VLOOKUP(A2,'Paste'!$A:$E,2,FALSE),"HH:MM")
=TEXT(VLOOKUP(A2,'Eastern Time'!$A:$I,3,FALSE),"HH:MM")

and the Value on A2 in this example is as shown: Subject 1
 
Upvote 0
I expect cell D2 to return TRUE.
I don't expect it to return TRUE. The difference between 04:00 and 03:00 is 1 hour and 0 minutes. The MINUTES therefore is zero which is not > 1.

Similarly, when you make that small change to the formula it returns 0 as described above.

From the Microsoft Help on the MINUTE function.
Returns the minutes of a time value. The minute is given as an integer, ranging from 0 to 59.

BTW, to make it easier for people to help you in the future I suggest that you ..
  • Update your forum profile (click your user name at the top right of the forum, then ‘Account details’) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’), and

  • Investigate XL2BB for providing sample data & expected results to make it easier for helpers to copy your data for testing and understand just what you have & where it is and also what you want & where it is to be.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,608
Messages
6,179,872
Members
452,949
Latest member
Dupuhini

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