View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Cimjet[_3_] Cimjet[_3_] is offline
external usenet poster
 
Posts: 157
Default Copy/Paste_Value problem.

Hi Joeu2004
Thank you very much, it works perfectly.
Cimjet
"joeu2004" wrote in message
...
On Apr 1, 6:42 am, "Cimjet" wrote:
I'm using this vba line to retrieve Values from one sheet
but when the values are formulas, they retrieve the formula
instead of the value. I need to convert it to value and I
can't seem to use Paste Special.

[....]
Sheets("Invoice").Range("B2").Copy _
Destination:=Sheets("Summary").Range("A" & Lastrow + 1)


Well, you could do the following:

Sheets("Invoice").Range("B2").Copy
Sheets("Summary").Range("A" & Lastrow + 1).PasteSpecial _
Paste:=xlPasteValuesAndNumberFormats

But there is no need to involve the clipboard. Simply do the
following:

Sheets("Summary").Range("A" & Lastrow + 1) = _
Sheets("Invoice").Range("B2")