Thread: getformat
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Yendorian Yendorian is offline
external usenet poster
 
Posts: 32
Default getformat

Hi Bob,
Thanks for the rapid reply.
Sorry - I'm new to VBA and have no experience of UDFs.
I've entered the Function you sent me into a module but I don't know how to
activate it. aqny possibility of helping out again, please?
Yendorian

"Bob Phillips" wrote:

Create a UDF


Function CellFormat(rng As Range)
If rng.Cells.Count 1 Then

CellFormat = CVErr(xlErrRef)
Else

CellFormat = rng.NumberFormat
End If
End Function

and use lkike so

=CellFormat(B2)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Yendorian" wrote in message
...
I need to identify which currency format is being used in a particular cell
on an Excel worksheet. (Excel 2003). Ideally I'd like the format to appear
next to the cell in question.
e.g. $ 100.00 [$ #,##0.00]
Can anyone tell me how to do this, please? Thanks