View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_8_] Nigel[_8_] is offline
external usenet poster
 
Posts: 172
Default simple problem with values in cells

There is no obvious problem with the code, except it could be more efficient
by assigning the values directly.
for example......

Range("CA6").Value = "3.2745"
Range("CA7").Value = "8.9355"

This must be a format problem with the cells involved, suggest you set the
format of each cell individually to the required format eg numeric with 4
decimal places. I assume of course you are using a period as a decimal
separator not a comma ?

Cheers
Nigel



"Joachim" wrote in message
...
Hi all,
I use the following code to fill some values into cells

Range("CA6").Select
Range("CA6") = "3.2745"
Range("CA7").Select
Range("CA7") = "8.9355"
Range("CA8").Select
Range("CA8") = "8.9355"
Range("CA9").Select
Range("CA9") = "13.875"
Range("CA10").Select
Range("CA10") = "4.440"
Range("CA11").Select
Range("CA11") = "6.660"
-and more code-

everything works, but in cell CA6 I get 32745 and in cell CA7 I get 89355
:-(
The CA8 values is 8,9355 - what 's right :-)
The format of all cells are the same.

What can I do to geet also the both values in CA6 and CA7 in the right way

?

When I let a macro with specialy this part of code separatly it will works
?!?!

I use WINN XXP and XL2000 with SP3

Thanks for help ... joachim