View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Check if there is a decimal point

Try c.Text instead of c.Value, and use InStr(c.Text, ".")0 as an initial
screen for the point. To see if a six-character string has a decimal point
in its 4th position: Mid$(c.Text, Len(c.Text)-2, 1)="."

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Janos" wrote in message
...
Hello,

Within a for loop i need to check if and where a value has a decimal
point,
and then amend/add a decimal point. Ie:
100.11 - 100.11
100.1 - 10.01
100 - 1.00

I have tried convoluted ways o check such as Right(Left(c.value,3),1)="."
but it doesn't ever want to...

Any ideas, suggestions?

Much Appreciated,

Janos