Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
filter with special forrmating | Excel Programming |