Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Date Functions
Hi,
I need unique number to identify each month in the calendar system. The formula '=VALUE(RIGHT(YEAR(DATEVALUE("1-04-2016")),2)&"0"&MONTH(DATEVALUE("1-04-2016")))'returns the number I wanted for the current month. This there any better way of doing this? TIA Ahmed --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Date Functions
Hi Ahmed,
Am Thu, 21 Apr 2016 12:40:45 +0530 schrieb ahmed: '=VALUE(RIGHT(YEAR(DATEVALUE("1-04-2016")),2)&"0"&MONTH(DATEVALUE("1-04-2016")))'returns the number I wanted for the current month. This there any better way of doing this? try: =--(TEXT(DATEVALUE("1-04-2016"),"yy")&TEXT(DATEVALUE("1-04-2016"),"MM")) Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Date Functions
Hi Ahmed,
Am Thu, 21 Apr 2016 09:31:26 +0200 schrieb Claus Busch: =--(TEXT(DATEVALUE("1-04-2016"),"yy")&TEXT(DATEVALUE("1-04-2016"),"MM")) for me also works: =--(TEXT("1-04-2016","yy")&TEXT("1-04-2016","MM")) Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Date Functions
Hi again,
Am Thu, 21 Apr 2016 09:39:10 +0200 schrieb Claus Busch: =--(TEXT(DATEVALUE("1-04-2016"),"yy")&TEXT(DATEVALUE("1-04-2016"),"MM")) for me also works: =--(TEXT("1-04-2016","yy")&TEXT("1-04-2016","MM")) you also can enter a correct date and format it custom YYMM Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Date Functions
On 21/04/2016 01:28 PM, Claus Busch wrote:
Hi again, Am Thu, 21 Apr 2016 09:39:10 +0200 schrieb Claus Busch: =--(TEXT(DATEVALUE("1-04-2016"),"yy")&TEXT(DATEVALUE("1-04-2016"),"MM")) for me also works: =--(TEXT("1-04-2016","yy")&TEXT("1-04-2016","MM")) you also can enter a correct date and format it custom YYMM Regards Claus B. Both the formulas work fine. Thank you, Claus. Kind Regards, Ahmed. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date Functions | Excel Discussion (Misc queries) | |||
Date and Sum functions (HELP) | Excel Discussion (Misc queries) | |||
Date functions | Excel Discussion (Misc queries) | |||
Date functions | Excel Worksheet Functions | |||
DATE Functions??? | Excel Programming |