Thread: how forrmating
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default how forrmating

If myCell.NumberFormat = "#,##0.00"

or whatever your format is.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"SunTEam" wrote in message
...
Hey guys,
I need some help. In Excel is possible to set a cell for number format,
data format .. and more
I need to check this format in macro. Do You know, how to do it?

now i'll try to explain what i do, maybe there is another solution for
my problems. So, i've got a worksheet and inside numbers. Some numbers
are the prices and the rest are dimension of products. I need to
calculate those prices for foreign exchange (dollars, euro ....) So i
need increase the price numbers. I set the price cells to number format
( cells formating ) and the dimension to char type. To finish my work i
need to recognize is the current selected cells of number formatting.
i tryied something like that:

IsNumeric(myCell.Value)

but if the cells is of char formatting and inside is number - the result
of isNumberic is "true". How can i split my numbers to numbers and text
... and then recognize in VB script