ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Datedif function (https://www.excelbanter.com/excel-discussion-misc-queries/218488-datedif-function.html)

Taryn

Datedif function
 
Hi...I have a worksheet where dates are manually inputed. The columns are
labeled Input date (G2) and Date Closed (P2). The final column is labelled
Total Dates Open (W2) 1- What is the correct format I should use if I use the
Dateif function to calculate the total number of days from the Input date to
the Date closed. 2- Also, How do I use DateIF to caculate the input date and
today's actual date (real-time,until the date closed actually happens) to
still caculate the total dates open. For example G2 has an input date of
8/26/08 and P2 would have (todays actual date) and still caculate the Total
dates open to automatically display in column W2. Thanks!
--
TBJohnson

David Biddulph[_2_]

Datedif function
 
To get the total number of days from Input gate to Date Closed, the formula
=P2-G2 will do.
If you particularly want to use DATEDIF, then use =DATEDIF(G2,P2,"d")

Your second question isn't clear, but if you are saying that while P2 is
blank you want to use today's date in your W2 calculation, then try
=IF(P2="",TODAY(),P2)-G2
--
David Biddulph

"Taryn" wrote in message
...
Hi...I have a worksheet where dates are manually inputed. The columns are
labeled Input date (G2) and Date Closed (P2). The final column is
labelled
Total Dates Open (W2) 1- What is the correct format I should use if I use
the
Dateif function to calculate the total number of days from the Input date
to
the Date closed. 2- Also, How do I use DateIF to caculate the input date
and
today's actual date (real-time,until the date closed actually happens) to
still caculate the total dates open. For example G2 has an input date of
8/26/08 and P2 would have (todays actual date) and still caculate the
Total
dates open to automatically display in column W2. Thanks!
--
TBJohnson




Taryn

Datedif function
 
Success!!!! This works! I am impressed at how fast you answered my question!
It has saved me another day of fustration! Thanks so very much David!!!!!
--
TBJohnson


"David Biddulph" wrote:

To get the total number of days from Input gate to Date Closed, the formula
=P2-G2 will do.
If you particularly want to use DATEDIF, then use =DATEDIF(G2,P2,"d")

Your second question isn't clear, but if you are saying that while P2 is
blank you want to use today's date in your W2 calculation, then try
=IF(P2="",TODAY(),P2)-G2
--
David Biddulph

"Taryn" wrote in message
...
Hi...I have a worksheet where dates are manually inputed. The columns are
labeled Input date (G2) and Date Closed (P2). The final column is
labelled
Total Dates Open (W2) 1- What is the correct format I should use if I use
the
Dateif function to calculate the total number of days from the Input date
to
the Date closed. 2- Also, How do I use DateIF to caculate the input date
and
today's actual date (real-time,until the date closed actually happens) to
still caculate the total dates open. For example G2 has an input date of
8/26/08 and P2 would have (todays actual date) and still caculate the
Total
dates open to automatically display in column W2. Thanks!
--
TBJohnson






All times are GMT +1. The time now is 04:31 AM.

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