Copying values not formulas

J

Joe M.

I have the following piece of code

Here.EntireRow.Copy Destination:=There

This copies the formulas that are in this row, I need to
know how to modify this code to copy values instead of
formulas.

Any help?
 
J

Joe M.

Hi Tom, that will work for individual cells but I was
hoping for something that will allow me to copy the values
of an entire row at a time.
 
T

Tom Ogilvy

It works for any contiuous range of cells (of the same shape / count)

Range(1:1).Value = Range("15:15").Value


or
Range("A1").Resize(range("15:15").Rows.count, _
range("15:15").Columns.count).Value = Range("15:15").Value

if you want to use a paradigm similar to a single cell destination.
 
T

Tom Ogilvy

typo:

Range(1:1).Value = Range("15:15").Value

should be

Range("1:1").Value = Range("15:15").Value


or

Range("A1").EntireRow.Value = Range("A15").EntireRow.Value
 
J

Joe M.

Thanks Tom, that did the trick.
-----Original Message-----
typo:

Range(1:1).Value = Range("15:15").Value

should be

Range("1:1").Value = Range("15:15").Value


or

Range("A1").EntireRow.Value = Range("A15").EntireRow.Value

--
Regards,
Tom Ogilvy




.
 
Top