Keeping Cells hidden when Copying and Pasting

Status
Not open for further replies.

ERed1

Board Regular
Joined
Jun 26, 2019
Messages
104
Hey everyone,

I am trying to Copy data from one sheet and paste it into another. I want the rows that are hidden to stay hidden when they are being pasted instead of reappearing. I am guessing it is a Paste option, but I don't know which one. Thank you in advance.

Here is my code I am using:

If Range("B16").Value = "Dog" Then
Sheets("Animals").Range("A16:D19").Copy
Sheets("Finished").Activate
lastrow = Range("A65536").End(xlUp).Row
Cells(lastrow + 5, 1).PasteSpecial Operation:=xlNone, SkipBlanks:=False, Transpose:=False

Sheets("Animals").Range("A21:D30").Copy
Sheets("Finished").Activate
lastrow = Range("A65536").End(xlUp).Row
Cells(lastrow + 1, 1).PasteSpecial Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End If
 
Last edited:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Status
Not open for further replies.

Forum statistics

Threads
1,223,887
Messages
6,175,199
Members
452,617
Latest member
Narendra Babu D

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top