Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying values
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying values
sheet2.cells(1,1).Copy destination:=sheet1.cells(1,1)
or after your line put sheet2.cells(1,1).numberformat=sheet1.cells(1,1).n umberformat "tom" a écrit dans le message de news: ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying values
Add a second line of code like this:
sheet2.cells(1,1).value = sheet1.cells(1,1).value sheet2.cells(1,1).NumberFormat = sheet1.cells(1,1).NumberFormat -- Regards, Tom Ogilvy "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying only the numerical values | New Users to Excel | |||
Copying Cell Values | Excel Discussion (Misc queries) | |||
Copying Values to another Workbook | Excel Programming | |||
Copying values from one file to another | Excel Programming | |||
copying values | Excel Programming |