ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   including current date in formula (https://www.excelbanter.com/excel-worksheet-functions/70916-including-current-date-formula.html)

Candace

including current date in formula
 
I need to include the current month (such as 1, 2 3, ... etc for the number
of the month) in a formula. What I am doing is taking a total amount and
dividing that by the number of the current month (such as 2 for February) and
then multiplying that by 12. For example

D12 / (month of the year) * 12

But I need to replace "month of the year" with something that actually works
in a formula. Any help would be appreciated. Thanks.

Anne Troy

including current date in formula
 
If you have 2/1/2006 (February 1) in cell A1, the following will return "2":
=MONTH(A1)

************
Hope it helps!
Anne Troy
www.OfficeArticles.com
Check out the NEWsgroup stats!
Check out: www.ExcelUserConference.com

"Candace" wrote in message
...
I need to include the current month (such as 1, 2 3, ... etc for the number
of the month) in a formula. What I am doing is taking a total amount and
dividing that by the number of the current month (such as 2 for February)
and
then multiplying that by 12. For example

D12 / (month of the year) * 12

But I need to replace "month of the year" with something that actually
works
in a formula. Any help would be appreciated. Thanks.




Bernard Liengme

including current date in formula
 
Current month is found with =MONTH(TODAY())
So your formula could be =D12*12/MONTH(TODAY())
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Candace" wrote in message
...
I need to include the current month (such as 1, 2 3, ... etc for the number
of the month) in a formula. What I am doing is taking a total amount and
dividing that by the number of the current month (such as 2 for February)
and
then multiplying that by 12. For example

D12 / (month of the year) * 12

But I need to replace "month of the year" with something that actually
works
in a formula. Any help would be appreciated. Thanks.




[email protected]

including current date in formula
 
"Candace" wrote:
I need to include the current month (such as 1, 2 3, ... etc
for the number of the month) in a formula. [....] For example
D12 / (month of the year) * 12
But I need to replace "month of the year" with something
that actually works in a formula.


I think the following does what you asked literally:

=D12 / MONTH(NOW()) * 12

But I wonder if that is what you really meant to ask or
should have asked. You wrote ....

What I am doing is taking a total amount and dividing that
by the number of the current month


Do you really want the number 3 (March) if the total reflects
only the numbers through February (2), but you are looking
at the worksheet in March?

I suspect what you want is MONTH(A11), where A11 contains
the date of the last entry included in the total.


All times are GMT +1. The time now is 05:08 AM.

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