Adapt code questions

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

Can I adapt the following code to

a) paste only the values from rng2
and
b) paste only the Format

Set rng2 = TargetCell.Offset(-2, -2)
rng2.Copy
Destination:=Worksheets("TEMP").Cells _
(Rows.Count,
3).End(xlUp).Offset(2, -2)

Regards.
 
set rng3 = Worksheets("Temp").Cells(rows.count,3).end(xlup).Offset(2,-2)
rng2.copy
rng3.pastespecial paste:=xlValues
rng3.pastespecial paste:=xlFormats
 
Many thanks.

Regards.

Tom Ogilvy said:
set rng3 = Worksheets("Temp").Cells(rows.count,3).end(xlup).Offset(2,-2)
rng2.copy
rng3.pastespecial paste:=xlValues
rng3.pastespecial paste:=xlFormats
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top