PartTimeExcel
New Member
- Joined
- Dec 9, 2020
- Messages
- 17
- Office Version
- 365
- Platform
- Windows
Good morning, This line of code works, but it obviously does not copy just the visible cells.
PSU.Range("a1:a" & lastrow) = PS.Range(Cells(1, ColItemID), Cells(lastrow, ColItemID)).Value
I went to modify it (like below) so that it would copy just the visible cells value (I'd like the code to be all one line) but the syntax is off. Any ideas?
PSU.Range("a1:a" & lastrow) = PS.Range(Cells(1, ColItemID), Cells(lastrow, ColItemID)).SpecialCells(xlCellTypeVisible).Value
I went to modify it (like below) so that it would copy just the visible cells value (I'd like the code to be all one line) but the syntax is off. Any ideas?