View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default 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