Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default 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
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
TEXT(Cell1,"MMMM YYYY") to work in all locale. Jonathan Rynd Excel Programming 0 February 12th 04 06:33 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Kevin McCartney[_2_] Excel Programming 1 February 12th 04 02:10 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Kevin McCartney[_2_] Excel Programming 2 February 12th 04 01:36 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Dianne Excel Programming 0 February 10th 04 04:28 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. arno Excel Programming 0 February 10th 04 07:35 AM


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