ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Getting Difference between two cells (https://www.excelbanter.com/excel-worksheet-functions/72513-getting-difference-between-two-cells.html)

Jimmydageek

Getting Difference between two cells
 

OK I have two cells (different than last posting) that have times listed
in there as shown below.

:20:30
and
:30:40

I want to get the difference between these two cells to show in a third
area so I can see lets say -:10:10 like D2-D1. I try to do this now
but get the #Value! Error. And no Formatting cells helps. How would I
go about this?

TIA.
Jimmy


--
Jimmydageek
------------------------------------------------------------------------
Jimmydageek's Profile: http://www.excelforum.com/member.php...o&userid=31692
View this thread: http://www.excelforum.com/showthread...hreadid=513936


JJ

Getting Difference between two cells
 
Jimmydageek wrote:
OK I have two cells (different than last posting) that have times listed
in there as shown below.

:20:30
and
:30:40

I want to get the difference between these two cells to show in a third
area so I can see lets say -:10:10 like D2-D1. I try to do this now
but get the #Value! Error. And no Formatting cells helps. How would I
go about this?

TIA.
Jimmy


format those cells as time 00:00:00 and then subtract them
0:30:40-0:20:30=0:10:10 ...... the o is 12 AM as this is a 24 hour format

Jimmydageek

Getting Difference between two cells
 

Problem is that the report that I generate does not enter a value for
the Hour if there is no Hour. For example it literally prints :20:10
and not a "0" in the Hour spot. This creates some havoc on the
Formatting tool. Any ideas? :confused:


--
Jimmydageek
------------------------------------------------------------------------
Jimmydageek's Profile: http://www.excelforum.com/member.php...o&userid=31692
View this thread: http://www.excelforum.com/showthread...hreadid=513936


Pete_UK

Getting Difference between two cells
 
The values are being treated as text, so try this:

Highlight the column containing these entries, choose Data |
Text-to-columns then <finish

Hope this helps.

Pete



All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com