Can VBA copy and paste hidden rows and keep them hidden?

9tanstaafl9

Well-known Member
Joined
Mar 23, 2008
Messages
535
I don't think this is possible, but I thought it wouldn't hurt to ask.

I want to copy a large set of data where many random seeming rows have been hidden. I then want to paste that into several sheets and have those sheets look exactly like the original, with all the same rows hidden.

I can't simply copy the visible cells only as I need the hidden rows to remain available.

Is there an easy way to do this? If not, please don't spend a bunch of time on this, I can just re-run the macro that hid the rows in the first place, I was just trying to save time as my macro is already a bit slow.

Thanks in advance!

Jennifer
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
sounds like you are copying sheet data, so why not just copy the sheet, hidden rows and all?
 
Upvote 0
Because there is a bunch of stuff at the top of the sheet that differs. There is a different sheet for each day of the week and the formulas are not the same. Otherwise that would be a great idea. And there is data validation and conditional formatting in the nonstandard areas. I think it would be too hard to recreate using the macro. If there isn't an easy way to do this I'll just make them sit there for a minute or so while the longer less clean version runs.
 
Last edited:
Upvote 0
Google is my best friend! I always check there before any forum because usually there's lots to read. I searched for "vba copy paste hidden rows" and saw a few that might help you & you could just copy the code. I don't want to copy and paste here and make it look like I'm trying to take any credit for writing it, plus you might find that one is more suitable to you than the other. Doesn't look too difficult, so check it out! Good luck.
 
Upvote 0
I appreciate your suggestion but that didn't work for me when I tried it. I found MANY articles about copying only the visible cells, or copying and pasting, but none that address copying cells containing both visible and hidden rows and having the pasted region remain looking the same with the same rows hidden or showing. I am self taught at this and I was hoping there was just some basic piece of knowledge I was missing about how to do this. If it just isn't possible that's fine, I just wanted to know.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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