Struggling with a Formula that has to do with date and time

Tclinken

New Member
Joined
Feb 19, 2018
Messages
12
I need a formula that has a cell which counts dwelling time in hours between: Cell A2 [=NOW() function] and [mmm dd yyyy H:mm) date format] :confused:

Example:
How long a package has been on a front door step,
in A1 [this is the date and time the package arrived], A2 [Is the =NOW() function]
I want A3 to display difference in time in hours between A2 and A1, :confused:
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Welcome to the Board!

Simply:
Code:
=A2-A1
and use this Custom Format: [hh]:mm
 
Upvote 0
The bigger date/time is in cell A2, right?

It sounds maybe your value in A1 is not entered as a valid date/time, but maybe as Text instead.
What does this return?
=ISNUMBER(A1)
 
Last edited:
Upvote 0
Please provide us with an example of what is in A1 that returns this error for you.
 
Upvote 0
1601921195138.png

is the cell (A1)

1601921304346.png

is the formal for (a1)

1601921348441.png

<<< a2 using =NOW() using the same cell format.

A3 >>> i've been getting close using this formula
Excel Formula:
=IF(A1>0<A2,(A2-A1)*24,0)
but the end result is "0"
 
Last edited by a moderator:
Upvote 0
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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