Thread: copying values
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default copying values

You need to set the number format something like this...

Sheet2.Cells(1, 1).Value = Sheet1.Cells(1, 1).Value
Sheet2.Cells(1, 1).NumberFormat = Sheet1.Cells(1, 1).NumberFormat

--
HTH...

Jim Thomlinson


"tom" wrote:

Suppose sheet1.A1 has value 0.00 displayed on worksheet. Hoewever, the value
"0" is stored in the formula box. When I execute the code below, it displays
"0" on sheet2.A1 instead of 0.00. How can I make this operation give me 0.00?

sheet2.cells(1,1).value = sheet1.cells(1,1).value