#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 577
Default Month Formula

I am working on a spreadsheet that has monthly data for a five-year period. I
need to convert all the data for each month into daily data. I am simply
dividing the total for each month by the number of days in each respective
month..Instead of copy and paste, or drag and drop, is there a formula that
allows a user to click on a cell containing the name of a month and have
excel recognize the number of days in that month? For example, if A1 has
"September" and B1 has 1,000,000, can I insert a formula in C1 that allows me
to do =B1/A1 instead of B1/30?

Sorry for the confusion and thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Month Formula

With your date in A1:

=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

HTH,
Paul

--

"scott" wrote in message
...
I am working on a spreadsheet that has monthly data for a five-year period.
I
need to convert all the data for each month into daily data. I am simply
dividing the total for each month by the number of days in each respective
month..Instead of copy and paste, or drag and drop, is there a formula
that
allows a user to click on a cell containing the name of a month and have
excel recognize the number of days in that month? For example, if A1 has
"September" and B1 has 1,000,000, can I insert a formula in C1 that allows
me
to do =B1/A1 instead of B1/30?

Sorry for the confusion and thanks for the help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 577
Default Month Formula

Thanks for the formula, but it does not recognize that February has 28/29
days...it returns "30" for all February months in the five-year period. What
change do I need to make in the formula you provided me to fix this?

"PCLIVE" wrote:

With your date in A1:

=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

HTH,
Paul

--

"scott" wrote in message
...
I am working on a spreadsheet that has monthly data for a five-year period.
I
need to convert all the data for each month into daily data. I am simply
dividing the total for each month by the number of days in each respective
month..Instead of copy and paste, or drag and drop, is there a formula
that
allows a user to click on a cell containing the name of a month and have
excel recognize the number of days in that month? For example, if A1 has
"September" and B1 has 1,000,000, can I insert a formula in C1 that allows
me
to do =B1/A1 instead of B1/30?

Sorry for the confusion and thanks for the help.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default Month Formula

You could use EOMONTH and DAY to get the 28-31 number desired.

scott wrote:

I am working on a spreadsheet that has monthly data for a five-year period. I
need to convert all the data for each month into daily data. I am simply
dividing the total for each month by the number of days in each respective
month..Instead of copy and paste, or drag and drop, is there a formula that
allows a user to click on a cell containing the name of a month and have
excel recognize the number of days in that month? For example, if A1 has
"September" and B1 has 1,000,000, can I insert a formula in C1 that allows me
to do =B1/A1 instead of B1/30?

Sorry for the confusion and thanks for the help.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Month Formula

I'm not sure why you would be getting 30. As you know, you should never get
30. As long as you have a valid date including the year in the specified
cell (A1), then the result should be accurate. Try recalculating (F9).



--

"scott" wrote in message
...
Thanks for the formula, but it does not recognize that February has 28/29
days...it returns "30" for all February months in the five-year period.
What
change do I need to make in the formula you provided me to fix this?

"PCLIVE" wrote:

With your date in A1:

=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

HTH,
Paul

--

"scott" wrote in message
...
I am working on a spreadsheet that has monthly data for a five-year
period.
I
need to convert all the data for each month into daily data. I am
simply
dividing the total for each month by the number of days in each
respective
month..Instead of copy and paste, or drag and drop, is there a formula
that
allows a user to click on a cell containing the name of a month and
have
excel recognize the number of days in that month? For example, if A1
has
"September" and B1 has 1,000,000, can I insert a formula in C1 that
allows
me
to do =B1/A1 instead of B1/30?

Sorry for the confusion and thanks for the help.






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
Trying to get a Boolean formula to work month-to-month mstieler Excel Discussion (Misc queries) 4 July 18th 07 10:12 PM
Function or formula to convert "text" month to number of month? Steve Vincent Excel Discussion (Misc queries) 5 May 15th 07 01:11 AM
month formula Reggiee Excel Worksheet Functions 3 August 25th 06 05:54 PM
Function or formula to convert "text" month to number of month? Kevin Vaughn Excel Discussion (Misc queries) 0 February 4th 06 04:45 PM
Function or formula to convert "text" month to number of month Steve Vincent Excel Discussion (Misc queries) 1 February 4th 06 04:19 PM


All times are GMT +1. The time now is 07:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"