My overall goal is to transfer Data from Spreadsheet A that has been filtered into Spreadsheet B that has also been filtered. Copying and pasting refuses to cooperate given the filtering, I've also tried using an equation to make the cells equal to one another but I can't drag and drop that either without it applying to the filtered/hidden cells. I found the following formula:
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
This formula worked for some of the data but then suddenly stopped giving me an error. The Error I'm getting is "Paste Special Method of Range Class Failed". All attempts to use this have failed after the initial success and I'm unsure what happening to change it. The cells being copied and then pasted range from small words to numbers. I'm not sure exactly what is wrong with thing.pastespecial but it seems to be the issue.
Information on whatever is the simplest and most accurate way of copying the filtered information from Sheet A and Pasting it into SheetB would be greatly appreciated.
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
This formula worked for some of the data but then suddenly stopped giving me an error. The Error I'm getting is "Paste Special Method of Range Class Failed". All attempts to use this have failed after the initial success and I'm unsure what happening to change it. The cells being copied and then pasted range from small words to numbers. I'm not sure exactly what is wrong with thing.pastespecial but it seems to be the issue.
Information on whatever is the simplest and most accurate way of copying the filtered information from Sheet A and Pasting it into SheetB would be greatly appreciated.