G
Gary Keramidas
i use these to give me a range of filtered data:
fRow = .CurrentRegion.Offset(1, 0).SpecialCells(xlCellTypeVisible).Row
lRow = .Cells(Rows.Count, "A").End(xlUp).Row
(these seem to always work and give me range of rows)
but when i use the following line to set a range, it doesn't work if there is
only 1 filtered row. it works if there is more than 1 row.
Set rng = ws.Range(ws.Cells(fRow, "I"), ws.Cells(lRow,
"I")).SpecialCells(xlCellTypeVisible)
i get something like this for the range:
$1:$5,$3762:$3762,$8375:$65536
you can see that 3762 is the one filtered row i want in this case.
how can i set the range if there is only 1 row of filtered data?
fRow = .CurrentRegion.Offset(1, 0).SpecialCells(xlCellTypeVisible).Row
lRow = .Cells(Rows.Count, "A").End(xlUp).Row
(these seem to always work and give me range of rows)
but when i use the following line to set a range, it doesn't work if there is
only 1 filtered row. it works if there is more than 1 row.
Set rng = ws.Range(ws.Cells(fRow, "I"), ws.Cells(lRow,
"I")).SpecialCells(xlCellTypeVisible)
i get something like this for the range:
$1:$5,$3762:$3762,$8375:$65536
you can see that 3762 is the one filtered row i want in this case.
how can i set the range if there is only 1 row of filtered data?