Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA: Subtracting TIMES


If cell A1 = "5:00 PM" and cell A2 = "5:15 PM", what should the formul
for A3 be if I want to display the difference - i.e. 15 minutes?

Thanks

--
Laze
-----------------------------------------------------------------------
Lazer's Profile: http://www.excelforum.com/member.php...nfo&userid=750
View this thread: http://www.excelforum.com/showthread.php?threadid=27701

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel VBA: Subtracting TIMES

Try the following formula:

=(A2-A1)*60*24



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Lazer" wrote in message
...

If cell A1 = "5:00 PM" and cell A2 = "5:15 PM", what should the
formula
for A3 be if I want to display the difference - i.e. 15
minutes?

Thanks!


--
Lazer
------------------------------------------------------------------------
Lazer's Profile:
http://www.excelforum.com/member.php...fo&userid=7500
View this thread:
http://www.excelforum.com/showthread...hreadid=277018



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA: Subtracting TIMES

=A2-A1

format as hh:mm:ss

or

=(A2-A1)*24*60

and format as general if you want a number (rather than a time value) like
15 as the answer.

--
Regards,
Tom Ogilvy

"Lazer" wrote in message
...

If cell A1 = "5:00 PM" and cell A2 = "5:15 PM", what should the formula
for A3 be if I want to display the difference - i.e. 15 minutes?

Thanks!


--
Lazer
------------------------------------------------------------------------
Lazer's Profile:

http://www.excelforum.com/member.php...fo&userid=7500
View this thread: http://www.excelforum.com/showthread...hreadid=277018



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtracting Times [email protected] Excel Worksheet Functions 2 February 19th 07 04:47 PM
Subtracting times gaftalik Excel Discussion (Misc queries) 3 November 2nd 05 06:45 PM
Subtracting Times NChris Excel Worksheet Functions 1 February 10th 05 09:29 PM
Subtracting times [email protected] Excel Discussion (Misc queries) 1 January 12th 05 09:55 AM
Subtracting times. derek Excel Programming 3 August 25th 03 12:06 AM


All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"