Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ,
I need to extract November as "11" from November 2007. But this can change depending on the current month eg. "12" from December 2007. "11" should be in number format so that it can be used in calculations to calculate average costs. Thanks, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Not sure I understand it... Say you have a full/partial date in A1 Anywhere else on the sheet, use =Month(A1) to return the month number. eg: = IF ( Month(A1) = 11, ..., ... ) -- Regards, Sébastien <http://www.ondemandanalysis.com "manfareed" wrote: Hi , I need to extract November as "11" from November 2007. But this can change depending on the current month eg. "12" from December 2007. "11" should be in number format so that it can be used in calculations to calculate average costs. Thanks, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Dec 13, 11:40 am, manfareed
wrote: Hi , I need to extract November as "11" from November 2007. But this can change depending on the current month eg. "12" from December 2007. "11" should be in number format so that it can be used in calculations to calculate average costs. Thanks, Just use the Month() function... Private Sub test() Dim s As String, n As Integer s = "November 2007" n = Month(s) End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Thank you both. That works perfectly.
"manfareed" wrote: Hi , I need to extract November as "11" from November 2007. But this can change depending on the current month eg. "12" from December 2007. "11" should be in number format so that it can be used in calculations to calculate average costs. Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cells shows current month only in number format | New Users to Excel | |||
count month when date is in day/month/year format | Excel Worksheet Functions | |||
Number of days in month counted from shortened name of month & yea | Excel Worksheet Functions | |||
Converting Month Number to Month Text Abbreviation | Excel Worksheet Functions | |||
How do I convert a month-date format to day number of the year? | Excel Worksheet Functions |