Thought this was going to be Oh so simple!!
Messing with this for some time, now can’t see the wood for the trees.
From a command button, I want to copy the "VISIBLE" filtered range to another location on the same sheet.
(If it makes a difference the destination range MAY be hidden due to the filter)
Have tested various different adaptations to no avail!!
So far I have this:-
But this ONLY copies the LAST cell of the "VISIBLE" filtered range and NOT ALL the "VISIBLE" filtered range to the destination range.
Any help is always gratefully received.
Messing with this for some time, now can’t see the wood for the trees.
From a command button, I want to copy the "VISIBLE" filtered range to another location on the same sheet.
(If it makes a difference the destination range MAY be hidden due to the filter)
Have tested various different adaptations to no avail!!
So far I have this:-
VBA Code:
Sub CopyFilteredRng()
'Application.ScreenUpdating = False
Dim sht As Worksheet
Dim rng As Range
Dim rngCopy As Range
Dim Frow As Long
Dim Lrow As Long
Set sht = ThisWorkbook.ActiveSheet
Set rng = Range("AK:AK").Find(what:="Sub Total", LookIn:=xlValues, LookAt:=xlWhole)
Frow = rng.Row
Lrow = sht.Cells(sht.Rows.Count, "AT").End(xlUp).Row
Set rngCopy = Range("AT" & Frow - 1 & ":AT" & Lrow + 1).SpecialCells(xlCellTypeVisible)
rngCopy.Copy Range("AK" & Frow + 2)
'Application.CutCopyMode = False
'Application.ScreenUpdating = True
End Sub
Any help is always gratefully received.