Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
Hi
I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it TI KM |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
Hi
AFAIK this is not possible with using only worksheet functions -----Original Message----- Hi, I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it? TIA KM . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
What does AFAIK mea
----- Frank Kabel wrote: ---- H AFAIK this is not possible with using only worksheet function -----Original Message---- Hi I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it TI K |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
Grüezi Kevin
Kevin McCartney schrieb am 18.05.2004 I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it? There might be a possibility when you use xl4Macros in a defined name. Insert -- Names -- Define -- Names in Workbook: 'Cellformat' -- Refers to: =GET.CELL(7;INDIRECT("RC(-1)";FALSE)) -- [Add] -- [OK] When you like to see the format of A1, then: B1 =Cellformat 'Cellformat' evaluates the cell left of where you use it in the table. -- Mit freundlichen Grüssen Thomas Ramel - MVP für Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
Hi
AFAIK: As far as I know -----Original Message----- What does AFAIK mean ----- Frank Kabel wrote: ----- Hi AFAIK this is not possible with using only worksheet functions -----Original Message----- Hi, I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it? TIA KM . . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
it might be important to note that if you copy a cell using this formula and
paste it on another sheet, in xl2000 and earlier, this will cause a general protection fault, excel will close and you will loose any changes to your workbook. I believe xl2002 and possibly xl2003 are more tolerant. -- Regards, Tom Ogilvy "Thomas Ramel" wrote in message ... Grüezi Kevin Kevin McCartney schrieb am 18.05.2004 I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it? There might be a possibility when you use xl4Macros in a defined name. Insert -- Names -- Define -- Names in Workbook: 'Cellformat' -- Refers to: =GET.CELL(7;INDIRECT("RC(-1)";FALSE)) -- [Add] -- [OK] When you like to see the format of A1, then: B1 =Cellformat 'Cellformat' evaluates the cell left of where you use it in the table. -- Mit freundlichen Grüssen Thomas Ramel - MVP für Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
Grüezi Tom
Tom Ogilvy schrieb am 18.05.2004 it might be important to note that if you copy a cell using this formula and paste it on another sheet, in xl2000 and earlier, this will cause a general protection fault, excel will close and you will loose any changes to your workbook. Thanks for upgrading my knowledge :-) I believe xl2002 and possibly xl2003 are more tolerant. It may be that SP3 fixed this problem - Excel refuses to paste this 'macro-formula', but it stays alive. -- Regards Thomas Ramel - MVP for Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell("Format") to return MMMM YYYY instead of D3
Hi Kevin,
For dates and time you may not necessarily get what you ask for because Excel may take your format and say that is Kevn's regional format. But see if this gets what you want -- it definitely will not give you D3. See my http://www.mvps.org/dmcritchie/excel....htm#getformat Function GetFormat(Cell as Range) as String GetFormat = cell.NumberFormat End Function =GetFormat(A3) =Personal.xls!GetFormat(A3)- --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Kevin McCartney" wrote in message ... Hi, I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it? TIA KM |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
How To: Use Cell(
"David McRitchie" wrote...
For dates and time you may not necessarily get what you ask for because Excel may take your format and say that is Kevn's regional format. But see if this gets what you want -- it definitely will not give you D3. See my http://www.mvps.org/dmcritchie/excel....htm#getformat Function GetFormat(Cell as Range) as String GetFormat = cell.NumberFormat End Function ... "Kevin McCartney" wrote in message I'm trying to get the format property of a of a cell with using macros just using worksheet functions. When I use Cell("Format",A1) it returns D3, but I need the MMMM YYYY custom format that I have placed on the cell to be returned, any ideas how to get it? In other words, there's no way to do this without using some form of macro programming, either XLM formulas in defined names (which can be dangerous in older XL versions) or VBA. If the OP can't use VBA or XLM, the OP can't get the number format. -- To top-post is human, to bottom-post and snip is sublime. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
TEXT(Cell1,"MMMM YYYY") to work in all locale. | Excel Programming | |||
TEXT(Cell1,"MMMM YYYY") to work in all locale. | Excel Programming | |||
TEXT(Cell1,"MMMM YYYY") to work in all locale. | Excel Programming | |||
TEXT(Cell1,"MMMM YYYY") to work in all locale. | Excel Programming | |||
TEXT(Cell1,"MMMM YYYY") to work in all locale. | Excel Programming |