Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro cuts off decimals!?
Hi,
The program below copies a list of assumptions line-by- line into a model and then records the output of the model. This is the problem. When the program copies and pastes the output from sheet1 back into sheet2, it simply cuts off most of the decimals. Is it possible to instruct the macro to keep these decimals? Thanks, Allan Public Sub Model() Dim cell As Range For Each cell In Worksheets("sheet2").Range("N8:N327") cell.Resize(1, 5).Copy With Worksheets("sheet1") .Range("B2").PasteSpecial Paste:=xlValues, Transpose:=True cell.Offset(0, -5).Value = .Range("B9").Value cell.Offset(0, -4).Value = .Range("B10").Value cell.Offset(0, -3).Value = .Range("B11").Value cell.Offset(0, -2).Value = .Range("B12").Value End With Next End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro cuts off decimals!?
try
format(yourrange,"whatever") or numberformat(same stuff) -- Don Guillett SalesAid Software "Allan" wrote in message ... Hi, The program below copies a list of assumptions line-by- line into a model and then records the output of the model. This is the problem. When the program copies and pastes the output from sheet1 back into sheet2, it simply cuts off most of the decimals. Is it possible to instruct the macro to keep these decimals? Thanks, Allan Public Sub Model() Dim cell As Range For Each cell In Worksheets("sheet2").Range("N8:N327") cell.Resize(1, 5).Copy With Worksheets("sheet1") .Range("B2").PasteSpecial Paste:=xlValues, Transpose:=True cell.Offset(0, -5).Value = .Range("B9").Value cell.Offset(0, -4).Value = .Range("B10").Value cell.Offset(0, -3).Value = .Range("B11").Value cell.Offset(0, -2).Value = .Range("B12").Value End With Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count digits before decimals and after decimals | Excel Worksheet Functions | |||
Deleting Macro Short Cuts | Excel Discussion (Misc queries) | |||
Short-cuts | Excel Discussion (Misc queries) | |||
Short cuts? | Excel Discussion (Misc queries) | |||
Text Cuts Off | Excel Discussion (Misc queries) |