Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Number of days in month counted from shortened name of month & yea

I'd need to get the number of days in a month from the shortened name of
month and a year.
I have for example JAN in cell A1, and 2007 in cell A2, and I would need to
get the 31 as a result.

Any suggestions?

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Number of days in month counted from shortened name of month & yea

One way:
=DAY(DATE(YEAR("1-"&A1&"-"&B1),MONTH("1-"&A1&"-"&B1)+1,0))
--
David Biddulph

"Tumar" wrote in message
...
I'd need to get the number of days in a month from the shortened name of
month and a year.
I have for example JAN in cell A1, and 2007 in cell A2, and I would need
to
get the 31 as a result.

Any suggestions?

Thanks in advance!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Number of days in month counted from shortened name of month &

Thanks for the quick answer!

I still get the " Formula you typed contains an error"-message
I did try something similar yesterday, but every time I seem to get this
error message referring to ,MONTH part of the formula.

Any idea why this is & what would help?

" One way:
=DAY(DATE(YEAR("1-"&A1&"-"&B1),MONTH("1-"&A1&"-"&B1)+1,0))
--

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Number of days in month counted from shortened name of month &

Do you have your machine set up to expect a semi-colon (rather than a comma)
as a list separator?
--
David Biddulph

"Tumar" wrote in message
...
Thanks for the quick answer!

I still get the " Formula you typed contains an error"-message
I did try something similar yesterday, but every time I seem to get this
error message referring to ,MONTH part of the formula.

Any idea why this is & what would help?


" One way:
=DAY(DATE(YEAR("1-"&A1&"-"&B1),MONTH("1-"&A1&"-"&B1)+1,0))
--



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Number of days in month counted from shortened name of month &

Thanks a bunch!
How stupid of me.. Now I'm getting it right.

"David Biddulph" kirjoitti:

Do you have your machine set up to expect a semi-colon (rather than a comma)
as a list separator?
--
David Biddulph

"Tumar" wrote in message
...
Thanks for the quick answer!

I still get the " Formula you typed contains an error"-message
I did try something similar yesterday, but every time I seem to get this
error message referring to ,MONTH part of the formula.

Any idea why this is & what would help?


" One way:
=DAY(DATE(YEAR("1-"&A1&"-"&B1),MONTH("1-"&A1&"-"&B1)+1,0))
--






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Number of days in month counted from shortened name of month & yea

On Tue, 18 Sep 2007 00:12:00 -0700, Tumar
wrote:

I'd need to get the number of days in a month from the shortened name of
month and a year.
I have for example JAN in cell A1, and 2007 in cell A2, and I would need to
get the 31 as a result.

Any suggestions?

Thanks in advance!


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

should do what you want.
--ron
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Number of days in month counted from shortened name of month & yea

Try this formula:

=DAY(EOMONTH(A1&A2,0))


"Tumar" wrote:

I'd need to get the number of days in a month from the shortened name of
month and a year.
I have for example JAN in cell A1, and 2007 in cell A2, and I would need to
get the 31 as a result.

Any suggestions?

Thanks in advance!

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
function to fill all days of month to end of month Monique Excel Worksheet Functions 11 May 1st 06 07:39 PM
function to fill all days of month to end of month YaHootie Excel Worksheet Functions 10 May 1st 06 06:01 AM
Number of Days in the Month Beth Excel Discussion (Misc queries) 2 March 2nd 06 03:44 PM
number of days in a month Ryan Proudfit Excel Worksheet Functions 8 April 7th 05 08:02 PM
Count number of days in given month? Bryan Excel Worksheet Functions 10 February 2nd 05 11:44 PM


All times are GMT +1. The time now is 09:05 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"