Created
October 16, 2019 08:57
-
-
Save phongaster/91ce921d34eb9308ef9f6e71021bfe1c to your computer and use it in GitHub Desktop.
Pasting into visible cells only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub Copy_Filtered_Cells() | |
| Set from = Selection | |
| Set too = Application.InputBox("Select range to copy selected cells to", Type:=8) | |
| For Each Cell In from | |
| Cell.Copy | |
| For Each thing In too | |
| If thing.EntireRow.RowHeight > 0 Then | |
| thing.PasteSpecial | |
| Set too = thing.Offset(1).Resize(too.Rows.Count) | |
| Exit For | |
| End If | |
| Next | |
| Next | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment