Lisa070780
New Member
- Joined
- Feb 18, 2022
- Messages
- 2
- Office Version
- 2013
- Platform
- Windows
I hope you can help me.
I have filtered (by blank) data on a worksheet with hidden columns and I'd like to be able to paste this filtered data (visible cells only) to another worksheet which also contains the same hidden columns (skip the hidden columns).
When I use VBA or try to this manually with 'visible cells' and 'skip blanks' it doesn't work because the data is filtered. It works fine if the data isn't filtered by using 'visible cells' and 'skip blanks'!
This is the code that I'm working with:
Sub PasteAll()
PasteAll Macro
Application.Goto Reference:="xxxx_xxxxx_xxxxx"
Selection.Copy
Sheets("xxxxx xxxxx").Select
Range("A9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("xxxx xxxxx").Range("$A$8:$AS$13000").AutoFilter Field:=45, Criteria1:=""
Application.Goto Reference:="xxxx_xxxx"
Application.CutCopyMode = False
Selection.Copy
Sheets("xxx xxxxx").Select
Range("A9").PasteSpecial (xlPasteValues)
Sheets("xxxx xxxxx").Range("$A$8:$AS$13000").AutoFilter Field:=45
End Sub
Thanks in advance.
I have filtered (by blank) data on a worksheet with hidden columns and I'd like to be able to paste this filtered data (visible cells only) to another worksheet which also contains the same hidden columns (skip the hidden columns).
When I use VBA or try to this manually with 'visible cells' and 'skip blanks' it doesn't work because the data is filtered. It works fine if the data isn't filtered by using 'visible cells' and 'skip blanks'!
This is the code that I'm working with:
Sub PasteAll()
PasteAll Macro
Application.Goto Reference:="xxxx_xxxxx_xxxxx"
Selection.Copy
Sheets("xxxxx xxxxx").Select
Range("A9").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("xxxx xxxxx").Range("$A$8:$AS$13000").AutoFilter Field:=45, Criteria1:=""
Application.Goto Reference:="xxxx_xxxx"
Application.CutCopyMode = False
Selection.Copy
Sheets("xxx xxxxx").Select
Range("A9").PasteSpecial (xlPasteValues)
Sheets("xxxx xxxxx").Range("$A$8:$AS$13000").AutoFilter Field:=45
End Sub
Thanks in advance.