The issue I am having with autofilter is that it isn't hiding the first row of a range when the first cell in the filtered column of that range is empty.
Code snippet:
Row 6 contain the headers which should not be copied
Row 7 is the start of the data
Column 6 (F) contains the times (in HH:MM) and is the column I am filtering on.
Cell F6 contains no time therefore it should be hidden by autofilter but it isn't
I have tried varying the range to "A6:H" & lastrow and whilst this did hide the blank row 6, when 'copy' was applied it started it row 9 and ignored 8 which has a value.
Any suggestions welcomed!
Code snippet:
Code:
If Range("G1") > 0 'Then 'competitors' times have been entered
lastrow = Range("G" & Rows.Count).End(xlUp).Row 'identify the last used row
Set GetRange = Range("A7:H" & lastrow) 'range to filter/copy
With GetRange
.AutoFilter
.AutoFilter Field:=6, Criteria1:="<>"
.SpecialCells(xlCellTypeVisible).Copy
Range("BB7").PasteSpecial Paste:=xlPasteValues
.AutoFilter
End With
Row 7 is the start of the data
Column 6 (F) contains the times (in HH:MM) and is the column I am filtering on.
Cell F6 contains no time therefore it should be hidden by autofilter but it isn't
I have tried varying the range to "A6:H" & lastrow and whilst this did hide the blank row 6, when 'copy' was applied it started it row 9 and ignored 8 which has a value.
Any suggestions welcomed!