PDA

View Full Version : Format values copied and concatenated



jolivanes
11-13-2009, 11:38 AM
Range("L4").Value = Range("D65536").End(xlUp).Offset(, -3).Value _
& " / " & Range("D65536").End(xlUp).Value

Above snippet works fine when the values are with 2 decimals. It will also show the two decimals. However, when the values are for instance 1234.00, the pasted and concatenated values don't show the decimals (.00).
I have tried using Text("#,##0.00") but somehow I keep getting it wrong.
I would like to have the decimals included. How would I change the code to make it work?

Thanks in advance.

Regards

John

Bob Phillips
11-13-2009, 12:18 PM
Maybe

Range("L4").Value = Format(Range("D65536").End(xlUp).Offset(, -3).Value, "#,##0.00") _
& " / " & Format(Range("D65536").End(xlUp).Value, "#,##0.00")

jolivanes
11-13-2009, 12:40 PM
As usual Bob, right on.

Thank you very much for your help.

Regards

John