Search : in
By :

Calculation of month days

Last answer on Jul 28, 2009 2:11:06 pm BST dany, on Jul 27, 2009 9:12:13 am BST 
 Report this message to moderators

Hello,
i want to change the total no. of days every month,like juky caries 31 and august cary 30 and feb cary 28 ,
so according to the month i want my the total days sould be calculated automaticly.
any formula?

Configuration: Windows XP Internet Explorer 7.0

Best answers for « calculation of month days » in :
Mktime() - Timestamp yesterday, last month, etc.). Show Mktime() - Timestamp yesterday, last month, etc.) Intro Last 24 hours Yesterday This week Last week This Month Last 30 days (last 30 days) Last month Current year(this year) Last year (last year) Intro The mktime()function...
[PHP]Last day of the month/Number of days in the month Show Last day of the month and number of days in a month Using $m as the number of the month i and $y as year. Function date() can display directly the number of days in the month using the "t" character:
Calculate the power of your Power supply ShowCalculate the power of your Power supply Choosing the right power supply Links Choosing the right power supply When building up your PC it is quite difficult to determine the power supply to be used( this will depend on the...
Verifying date format in PHP ShowVerifying date format in PHP There are several ways to check the format of a date in PHP; the simplest method is to make use regular expressions. To confirm a date format DD/MM/YYYY, where the days and/or month can be given as...
MySQL - SELECT ... YESTERDAY ShowMySQL - SELECT ... YESTERDAY Make use of the following syntax: SELECT * FROM myTable WHERE field_date = DATE_SUB(CONCAT(CURDATE(), ' 00:00:00'), INTERVAL 1 DAY) In order to select previous records: SELECT * FROM myTable WHERE field_date =...
Download The Love Calculator ShowLove is a big word, then all means are good to find it. The name of each can say about it on compatibility between two persons a lot. The Love Calculator is a program which counting affinity between two individuals. It is not a precise science,...
Processor ShowIntroduction The processor (CPU, for Central Processing Unit) is the computer's brain. It allows the processing of numeric data, meaning information entered in binary form, and the execution of instructions stored in memory. The first...
Computer - History ShowThe history of the computer owes its existence to the fact that people, who are lazy by nature, have always sought to improve their ability to calculate, in order to reduce errors and save time. Origins: The abacus The "abacus" was invented in the...
Spreadsheet - Formulas ShowIntroduction to Formulas The main use of a spreadsheet is to automate calculations, which means using cells to perform operations based on values in other cells. The spreadsheet recalculates all the values each time a change is made to the value of...

1

venkat1926, on Jul 27, 2009 10:57:20 am BST

Do this simple experiment
in A1 type
1/1/09
highlight A1 to A12
click edit(menut)-fill-series
in the series window
"series in" click "columns" if not elaeady done
click "date" under "type"
click "month" under "date unit"
step is 1

click ok

your will get A1 to A12 like this


in B1 copy paste this formula
=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)
copy B1 down
format this column B as date
in C1 copy paste ths formula

=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)
copy C1 down
format column c as number with no decimal places.

you will get

1/1/2009 31-Jan-09 31
2/1/2009 28-Feb-09 28
3/1/2009 31-Mar-09 31
4/1/2009 30-Apr-09 30
5/1/2009 31-May-09 31
6/1/2009 30-Jun-09 30
7/1/2009 31-Jul-09 31
8/1/2009 31-Aug-09 31
9/1/2009 30-Sep-09 30
10/1/2009 31-Oct-09 31
11/1/2009 30-Nov-09 30
12/1/2009 31-Dec-09 31

is this what you want

Reply to venkat1926

2

dany, on Jul 27, 2009 11:23:18 am BST

Hi venkat thanx for your help,
let me explain wat exactly i need,
i have a attandance sheet and i inserted every formula into that attn sheet.
the sheet contains our billing and the workers salary.everything i got the main problen in the attn sheetis
our co.account people calculate the bill and salary as per the days of month.
only thing i need to know is if i type the month name in the work sheet can i get the no. of days.
suppose if iam typing june can i get the no. of days.

Reply to dany

3

Trowa, on Jul 27, 2009 12:53:27 pm BST

Hi danny,

I'm not as good as Venkat but this is what you could do.

Make an extra sheet with the month under each other and the number of days next to them (you could hide this sheet).

In the cell you want the number of days use a V.LookUp function. The search value will be the cell you enter the name of the month in. The matrix to search in will be on the hidden sheet and the columnindexnumber will be 2.

Hope this is useful.

Best regards,
Trowa

Reply to Trowa

4

venkat1926, on Jul 28, 2009 1:44:58 am BST

Dannny

Trowa has given you the correct solution. You can use my sheet as vlookup referecne
if there is problem post back.

Reply to venkat1926

5

dany, on Jul 28, 2009 3:57:42 am BST

Thanx trowa,

i got ur reply but please can u send the work step by step how to st the formula

Reply to dany

6

 Trowa, on Jul 28, 2009 2:11:06 pm BST

Hi Danny,

Happy to see you are happy with my solution.

On sheet1 you put the name of the month in cell A1 then you the number of days in B1.
On sheet2 (the sheet you can hide) you input the names of each month in A1:A12.
Put the days of each month in B1:B12.

Now input the following formula in cell B1 from sheet1:
=v.lookup(A1;sheet2!A1:B12;2)

If you don't get the right result you might want to sort the data on sheet2:
select all month and days. Data>Sort>Sort column A>OK.

If you get an error you might want to change the ";" into a "," in the formula depending on your excel version.

Hope this info is sufficient for you.

Best regards,
Trowa

Reply to Trowa