Let's say I have some rows or columns that are hidden, and drag a selection across where those hidden values would normally be. Is there a way to prevent Microsoft Excel from copying those hidden cells?

I've found a workaround that sometimes works by pasting it all into Notepad, and then copying that, then pasting it into the spreadsheet I want to paste those values into, but it seems there should be a better way to do that. Unfortunately this workaround doesn't always work so well.