From: pls123 on
hi all i need to make this copy..

aWS.Range("L80").Value = aWS.Range("J80").Value

but with format with 4 decimals...
can anybody help ?
tx! paolo
From: JLGWhiz on
Assuming you want numeric:

aWS.Range("L80").Value = aWS.Range("J80").Value
aWS.Range("L80").NumberFormat = CDbl("#,##0.0000")

But Excel will clip all zeros on the right of any digit of value.


"pls123" <pls123(a)discussions.microsoft.com> wrote in message
news:D648189E-8645-4555-B37E-1ED62643B1F6(a)microsoft.com...
> hi all i need to make this copy..
>
> aWS.Range("L80").Value = aWS.Range("J80").Value
>
> but with format with 4 decimals...
> can anybody help ?
> tx! paolo


From: Gary''s Student on
Sub dural()
Set aWS = ActiveSheet
aWS.Range("L80").Value = aWS.Range("J80").Value
aWS.Range("L80").NumberFormat = "0.0000"
End Sub

--
Gary''s Student - gsnu201003
From: Rick Rothstein on
You accidentally encased your string expression in a CDbl function call; I
believe you meant to post this...

aWS.Range("L80").NumberFormat = "#,##0.0000"

--
Rick (MVP - Excel)



"JLGWhiz" <JLGWhiz(a)cfl.rr.com> wrote in message
news:OjddOZ68KHA.1436(a)TK2MSFTNGP06.phx.gbl...
> Assuming you want numeric:
>
> aWS.Range("L80").Value = aWS.Range("J80").Value
> aWS.Range("L80").NumberFormat = CDbl("#,##0.0000")
>
> But Excel will clip all zeros on the right of any digit of value.
>
>
> "pls123" <pls123(a)discussions.microsoft.com> wrote in message
> news:D648189E-8645-4555-B37E-1ED62643B1F6(a)microsoft.com...
>> hi all i need to make this copy..
>>
>> aWS.Range("L80").Value = aWS.Range("J80").Value
>>
>> but with format with 4 decimals...
>> can anybody help ?
>> tx! paolo
>
>
From: USH on
tx !!
and if i want format as hour ??

HH.MM.SS ??




"Gary''s Student" wrote:

> Sub dural()
> Set aWS = ActiveSheet
> aWS.Range("L80").Value = aWS.Range("J80").Value
> aWS.Range("L80").NumberFormat = "0.0000"
> End Sub
>
> --
> Gary''s Student - gsnu201003