View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Copy/Paste_Value problem.

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")