autofilter raises error 1004
If I know my data, I'd rather use some other technique than trusting what excel
thinks is the last cell.
And even though you've specified in your code to look at just a single column,
don't you still get the last used cell of the entire worksheet.
Lupussilvae wrote:
Hi Dave Peterson,
just a little improvement: EXCEL behaves ambiguous regarding the last
used cell. I prefer
Set lastCell = ThisWorkbook.Worksheets(shtName) _
.Range(ColName & ":" & ColName) _
.SpecialCells(xlCellTypeLastCell)
for finding the last Cell. The Rest is a loop looking for Value=""
LupusSilvae
--
Dave Peterson
|