VBA to copy entire sheet data + formatting

N

Nic@Rolls-Royce

Hello!!

I am trying to copy an entire spreadsheet (which uses formula)
and paste into another sheet as paste values keeping all the
formatting, cell colour etc...

futhermore the vba needs to look for data down coloum 'G' and delete
any rows that do not contain any data.

The name of the source sheet is 'Question data'

and the name of the output sheet is 'text values'

All help would be appreciated


All the best

Nic @ Rolls-Royce
 
T

Tom Ogilvy

Do paste special twice, once with values and once with formats

Worksheets("Question data").Cells.copy
With Worksheets("Text Values")
.Cells.PasteSpecial xlValues
.Cells.PasteSpecial xlFormats
.Columns(7).SpecialCells(xlBlanks).EntireRow.Delete
End With
 
N

Nic@Rolls-Royce

Just a quick thanks for the code

All is well and it works very very well


:
 
Joined
Feb 20, 2007
Messages
5
Reaction score
0
(message from the future)
And ... how to put copied Sheet into a variable, and how to past that variable later (if necessary) in the same Sheet in order to accomplish UNDO functionality?

Thanks
 

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

Top