Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how forrmating

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how forrmating

Bob Phillips napisał(a):
If myCell.NumberFormat = "#,##0.00"

or whatever your format is.


Thank for help, but i cannot resolve my problem yet
Now i'im trying something like that

For Each myCells In mrange
If myCells.NumberFormat = "#,##0.00" Then
If myCells.Value < 0 Then
myCells.Value = myCells.Value * some
End If
End If
Next

... and no one number is changed :-(

dimension numbers are like : 80
prices number are like: 30.00

can you help me more?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how forrmating

SunTEam napisał(a):
Bob Phillips napisał(a):

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


ok .now its' working
i changed "#,##0.00" to "0.00"
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default how forrmating

I would also put an Isnumeric test in there, just in case.

--

HTH

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


"SunTEam" wrote in message
...
SunTEam napisał(a):
Bob Phillips napisał(a):

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


ok .now its' working
i changed "#,##0.00" to "0.00"



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
filter with special forrmating dodo Excel Programming 2 July 10th 05 09:38 AM


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