ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Subtract Date Q (https://www.excelbanter.com/excel-worksheet-functions/174709-subtract-date-q.html)

Sean

Subtract Date Q
 
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?


Don Guillett

Subtract Date Q
 
Have you tried looking in the help index for DATE

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sean" wrote in message
...
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?



JP[_4_]

Subtract Date Q
 
Check out:

http://tinyurl.com/28kcfq
http://www.cpearson.com/excel/datetime.htm

HTH,
JP

On Jan 28, 10:35*am, Sean wrote:
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?



Fred Smith[_4_]

Subtract Date Q
 
Either:

=date(2008,1,28)-date(2008,1,25)
or
="28/01/08"-"25/01/08"

Regards,
Fred

"Sean" wrote in message
...
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?




All times are GMT +1. The time now is 11:48 PM.

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