krcranfill
New Member
- Joined
- Mar 14, 2022
- Messages
- 8
- Office Version
- 2013
- Platform
- Windows
So I am struggling with finding a way to implement a copy/paste scheme where I can assign the value of a filtered range using something similar to:
but I am running into a difficulty with selecting only the filtered cells in my first line where I set the copyrng object. It is grabbing the entire (unfiltered) range and I need to find a way to assign it to only visible cells in the databodyrange. Is that possible?
VBA Code:
set copyrng = worksheets("Sheet1").listobjects("table1").listcolumns(1).databodyrange
set paste_rng = worksheets("Sheet2").range("A1:A"& copyrng.rows.count)
paste_rng.value2 = copyrng.value2
but I am running into a difficulty with selecting only the filtered cells in my first line where I set the copyrng object. It is grabbing the entire (unfiltered) range and I need to find a way to assign it to only visible cells in the databodyrange. Is that possible?