ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting Days or Months (https://www.excelbanter.com/excel-worksheet-functions/156304-counting-days-months.html)

Not Excelerated[_2_]

Counting Days or Months
 
Hello,

I'm trying to take a column containing past dates (in the format:
MM/DD/YYYY); compare it to a CONSTANT, more current date (e.g. 04/01/2007);
calculate the difference in the number of days (my first choice) or months
(second choice); then populate that result in a corresponding column in that
same Excel sheet.

Your help is always appreciated and thanks in advance!

Chris

Pranav Vaidya

Counting Days or Months
 
Hi Chris,

Try function days360()
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Not Excelerated" wrote:

Hello,

I'm trying to take a column containing past dates (in the format:
MM/DD/YYYY); compare it to a CONSTANT, more current date (e.g. 04/01/2007);
calculate the difference in the number of days (my first choice) or months
(second choice); then populate that result in a corresponding column in that
same Excel sheet.

Your help is always appreciated and thanks in advance!

Chris


Mike H

Counting Days or Months
 
Hi,

It's done with subtratction and format the cell as general. For example with
your constant date in C1 and your earlier dates in column A in B1 try:-

=$c$1-A1

Drag down.

Mike

"Not Excelerated" wrote:

Hello,

I'm trying to take a column containing past dates (in the format:
MM/DD/YYYY); compare it to a CONSTANT, more current date (e.g. 04/01/2007);
calculate the difference in the number of days (my first choice) or months
(second choice); then populate that result in a corresponding column in that
same Excel sheet.

Your help is always appreciated and thanks in advance!

Chris


Peo Sjoblom

Counting Days or Months
 
For days it's a simple subtraction

=current_date-past_date


format result as general


for months


=DATEDIF(past_date,current_date,"m")



--
Regards,

Peo Sjoblom



"Not Excelerated" wrote in
message ...
Hello,

I'm trying to take a column containing past dates (in the format:
MM/DD/YYYY); compare it to a CONSTANT, more current date (e.g.
04/01/2007);
calculate the difference in the number of days (my first choice) or months
(second choice); then populate that result in a corresponding column in
that
same Excel sheet.

Your help is always appreciated and thanks in advance!

Chris





All times are GMT +1. The time now is 06:49 AM.

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