View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default getting a number format from a cell

Mike:

If you need to see the format, then:

Sub Macro1()
Dim str As String
str = Selection.Cells.NumberFormat
MsgBox (str)
End Sub


will display it.
--
Gary''s Student


"Robert" wrote:

str = Selection.Cells.NumberFormat

"Mike" wrote:

How do I get the number format from a given cell?

Range("E8").Select
str = Selection.NumberFormat

Thanks
Mike