What do I want is to copy an entire row's contents and formatting to another sheet.
At the moment I've had to settle for setting the old cells contents to the new cells contents and in doing so it only copies the contents and not the formatting. (my cells have different colours that need to be carried across)
At the moment I have the following: (this works fine for cells in the same sheet)
Range(Cells(45, 2), Cells(45, 3)).Copy Range(Cells(50, 2), Cells(50, 3))
However, I'm trying to do it from one sheet to another. (Copy from sheet 'Front_Page' to 'vg'). I tried using the following, obviously it doesn't work, but can someone please tell me what am I doing wrong?
Range.Worksheet("Front_Page").Range(Cells(45, 2), Cells(45, 3)).Copy Worksheet("vg").Range(Cells(50, 2), Cells(50, 3))
In the opening Select Specific Cells dialog box, choose Entire row in the Selection type section, select Equals in the Specific type drop-down list, enter the cell value into the text box and then click the OK button.
Use the shortcut CTRL A to select all the data. Use the shortcut CTRL C to copy the data (this will copy visible records only) Navigate to the worksheet that you want to copy the records to. Click in the cell that you want to paste your records into.
Looks like you try to copy cells from "Front_Pages" to "vg" since you use "cells" inside "range"
Range (cells ...).
If so, you can simply change the cell format as excel general range; try this code :
Sheets("vg").Range("B5") = Sheets("Front_Pages").Range("B4")
Sheets("vg").Range("C5") = Sheets("Front_Pages").Range("C4")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With