Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
I need to sort the items by their item
 
Posts: n/a
Default inputing different days in a month for a formula

I was wondering if it is possible to recognize the different numbers of
months in a day without using additional columns. Basically I want to
calculate the cost per day per month and per year. If anyone has any
information on this, please let me know. Thanks
  #2   Report Post  
Roger Govier
 
Posts: n/a
Default

At my time of life, I sometimes wish there were many months in a day
!!!

However, one way to find the number of days in a month would be
=DAY(EOMONTH(A1,0))
where A1 holds the date.

You need to have the Analysis Toolpak loaded - ToolsAddins and check the
Analysis Toolpak box

--
Regards

Roger Govier


"I need to sort the items by their item"
oft.com wrote in message
...
I was wondering if it is possible to recognize the different numbers of
months in a day without using additional columns. Basically I want to
calculate the cost per day per month and per year. If anyone has any
information on this, please let me know. Thanks



  #3   Report Post  
Roger Govier
 
Posts: n/a
Default

I should have added, format the cell with the formula as General

--
Regards

Roger Govier


"Roger Govier" wrote in message news:...
At my time of life, I sometimes wish there were many months in a day
!!!

However, one way to find the number of days in a month would be
=DAY(EOMONTH(A1,0))
where A1 holds the date.

You need to have the Analysis Toolpak loaded - ToolsAddins and check the
Analysis Toolpak box

--
Regards

Roger Govier


"I need to sort the items by their item"
oft.com wrote in
message ...
I was wondering if it is possible to recognize the different numbers of
months in a day without using additional columns. Basically I want to
calculate the cost per day per month and per year. If anyone has any
information on this, please let me know. Thanks





  #4   Report Post  
Sandy Mann
 
Posts: n/a
Default

To get the number of days in a month, with any date of the target month in
A1 use:

=DAY((A1+32-DAY(A1+32)))

so to use this in a calculation - say the daily rate is in C1 the total for
the month will be:

=DAY((A1+32-DAY(A1+32)))*C1

--
HTH

Sandy

Replace@mailinator with @tiscali.co.uk


"I need to sort the items by their item"
oft.com wrote in message
...
I was wondering if it is possible to recognize the different numbers of
months in a day without using additional columns. Basically I want to
calculate the cost per day per month and per year. If anyone has any
information on this, please let me know. Thanks



  #5   Report Post  
I need to sort the items by their item
 
Posts: n/a
Default

Yes Roger that did help for the months. Now how do I go about creating a
formula for the year.

"Roger Govier" wrote:

At my time of life, I sometimes wish there were many months in a day
!!!

However, one way to find the number of days in a month would be
=DAY(EOMONTH(A1,0))
where A1 holds the date.

You need to have the Analysis Toolpak loaded - ToolsAddins and check the
Analysis Toolpak box

--
Regards

Roger Govier


"I need to sort the items by their item"
oft.com wrote in message
...
I was wondering if it is possible to recognize the different numbers of
months in a day without using additional columns. Basically I want to
calculate the cost per day per month and per year. If anyone has any
information on this, please let me know. Thanks






  #6   Report Post  
Roger Govier
 
Posts: n/a
Default

Just take the 2 dates away from each other e.g.
A1 26/08/05
B1 26/08/05

=A1-B1 result 365
Ensure the cell with the formula is formatted General, other wise the result
will show up as a date 30/12/1900

Or, if you are wanting a single formula based upon the source cell as per
the previous monthly calculation then with date in A1
=DATE(YEAR(A1)+1,1,0)-DATE(YEAR(A1),1,0)

This relies upon the fact that Day 0 of a month, is equal to the last day of
the previous month so with a date of 26/08/2005 in A1, the formula is giving
DATE Year A1 = 2005 + 1 = 2006, Month 1, Day 0 therefore 31 /12/2005
DATE Year A1 =2005 , Month 1, Day 0 Therfore 31/12/2004
One minus the other = 365

probably, more strictly it should be
=DATE(YEAR(A1)+1,1,0)-DATE(YEAR(A1),12,31) + 1
as we know that the last month of the year has 31 days, but we would need to
add a 1 to the result to make the total inclusive of the first and last days
of the year.

--
Regards

Roger Govier


"I need to sort the items by their item"
oft.com wrote in message
...
Yes Roger that did help for the months. Now how do I go about creating a
formula for the year.

"Roger Govier" wrote:

At my time of life, I sometimes wish there were many months in a day
!!!

However, one way to find the number of days in a month would be
=DAY(EOMONTH(A1,0))
where A1 holds the date.

You need to have the Analysis Toolpak loaded - ToolsAddins and check the
Analysis Toolpak box

--
Regards

Roger Govier


"I need to sort the items by their item"
oft.com wrote in
message
...
I was wondering if it is possible to recognize the different numbers of
months in a day without using additional columns. Basically I want to
calculate the cost per day per month and per year. If anyone has any
information on this, please let me know. Thanks






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
Formula for Extracting Month out of a Date column PokerZan Excel Discussion (Misc queries) 3 June 10th 05 08:30 PM
number of days in a month Ryan Proudfit Excel Worksheet Functions 8 April 7th 05 08:02 PM
inputing formula amdx Excel Worksheet Functions 2 March 6th 05 10:00 PM
excel formula that can subtract days Gofer Excel Worksheet Functions 3 December 3rd 04 06:10 PM
Formula to convert to month Mel Excel Worksheet Functions 2 December 1st 04 11:52 PM


All times are GMT +1. The time now is 12:27 AM.

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"