Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
bil391
 
Posts: n/a
Default I would like to know how to enter the formula that would subtract.

I am trying to put together a fool proof spreadsheet in which it will
automatically compute time. For example; =SUM((B3-B2)) This would be (B3)
06:15 - 15:15 (B2) the result would be 9:00 hours, however when trying to
compute 23:15 - 02:15, using this formula it will not work. I would like to
find out how this can be corrected to compute the right time used. I have
tried the formula =SUM((B3-B2)*24)); this does not help either or even
replacing the *24 with *12. Your assistance would be greatly appreaciated.
  #2   Report Post  
Harald Staff
 
Posts: n/a
Default

Hi

If B2 is 15:15 and B3 is 6:15 , then isn't it B2-B3 ?

Also, you don't need the SUM( ) thing for this. Simply
=B2-B3

When end time pass midnight then the end time is smaller than start time
and you get trouble -which I believe is what you are asking for here. This
is easiest corrected this way:
=B2-B3+(B2<B3)

Replace B2 with whatever end time address you have and B3 with whatever
start time address.

HTH. Best wishes Harald


"bil391" skrev i melding
...
I am trying to put together a fool proof spreadsheet in which it will
automatically compute time. For example; =SUM((B3-B2)) This would be (B3)
06:15 - 15:15 (B2) the result would be 9:00 hours, however when trying to
compute 23:15 - 02:15, using this formula it will not work. I would like

to
find out how this can be corrected to compute the right time used. I have
tried the formula =SUM((B3-B2)*24)); this does not help either or even
replacing the *24 with *12. Your assistance would be greatly appreaciated.



  #3   Report Post  
bil391
 
Posts: n/a
Default

I just wanted to thank you very much, your assistance has solved the minor
problem, except I added the *12 at the end of the formula and it worked
flawlessly after that.

"Harald Staff" wrote:

Hi

If B2 is 15:15 and B3 is 6:15 , then isn't it B2-B3 ?

Also, you don't need the SUM( ) thing for this. Simply
=B2-B3

When end time pass midnight then the end time is smaller than start time
and you get trouble -which I believe is what you are asking for here. This
is easiest corrected this way:
=B2-B3+(B2<B3)

Replace B2 with whatever end time address you have and B3 with whatever
start time address.

HTH. Best wishes Harald


"bil391" skrev i melding
...
I am trying to put together a fool proof spreadsheet in which it will
automatically compute time. For example; =SUM((B3-B2)) This would be (B3)
06:15 - 15:15 (B2) the result would be 9:00 hours, however when trying to
compute 23:15 - 02:15, using this formula it will not work. I would like

to
find out how this can be corrected to compute the right time used. I have
tried the formula =SUM((B3-B2)*24)); this does not help either or even
replacing the *24 with *12. Your assistance would be greatly appreaciated.




  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

bil

Visit Chip Pearson's site and check out the pages on doing aritmetic with
times and dates.

Lots of info and formulas.

http://www.cpearson.com/excel/datetime.htm#AddingTimes


Gord Dibben Excel MVP

On Fri, 28 Jan 2005 15:03:01 -0800, bil391
wrote:

I am trying to put together a fool proof spreadsheet in which it will
automatically compute time. For example; =SUM((B3-B2)) This would be (B3)
06:15 - 15:15 (B2) the result would be 9:00 hours, however when trying to
compute 23:15 - 02:15, using this formula it will not work. I would like to
find out how this can be corrected to compute the right time used. I have
tried the formula =SUM((B3-B2)*24)); this does not help either or even
replacing the *24 with *12. Your assistance would be greatly appreaciated.


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
how do i enter data using formula and the Copy command For exa. 5494 New Users to Excel 0 January 28th 05 05:55 AM
How do I create a formula that would allow me to subtract from a d Justlearning New Users to Excel 5 January 27th 05 09:47 PM
how to enter a formula using column() function for a range Mike Peter Excel Worksheet Functions 6 December 8th 04 07:11 AM
formula will not enter? Brian Excel Worksheet Functions 1 December 2nd 04 04:50 PM
Can you enter a formula in a cell that auto-inputs calculations a. proactive Excel Worksheet Functions 4 November 9th 04 05:00 AM


All times are GMT +1. The time now is 04:12 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"