I need to filter, via VBA, the last 30 values available in a dynamic table but in the "manual filter" which is the line ... Is it possible to read the values in the "manual filter" in VB?
I need to filter, via VBA, the last 30 values available in a dynamic table but in the "manual filter" which is the line ... Is it possible to read the values in the "manual filter" in VB?
Abnerka,
Below is an example of VBA code that allows you to differentiate hidden cells from visible cells. Hidden cells get the value of RowHeight = 0 in Excel.
Const _
primeiraLinha = 4, _
ultimalinha = 12, _
colunaPrincipal = "A", _
tudo = colunaPrincipal & primeiraLinha & ":" & colunaPrincipal & ultimalinha
nomeAbaExcel = "Plan1"
Dim objetoLinha As Object
For Each objetoLinha In ThisWorkbook.Sheets(nomeAbaExcel).Range(tudo).Cells
If objetoLinha.RowHeight > 0 Then
Total = Total + 1
End If
Next objetoLinha
MsgBox Total
In fact I admit that I do not quite understand what you really need. But I believe that with this code you can adapt and solve the problem.
For all cases, the PivotTable provides the ability to filter the 30 largest and 30 smallest items (if it helps).