Good afternoon,

I was needing some help with the attached spreadsheet.

As pictured below:
- Circled in purple is the filter for the data that appears in the listbox;
- Circled in red is the column that has to be summed;
- Circled in blue is where the sum value has to appear.

The total value must appear even without filter and after the filter is placed, the values that appear relative to the filter must be added.

Attachment 828825

Formula: copy to clipboard
Sub Calculo_Colunas()

Dim Linhas As Double
Dim Repro As Double

With ListBox1

For Linha = 0 To .ListCount - 1
If IsNumeric(.List(Linha, 4)) = True Then
Repro = Repro + CDbl(.List(Linha, 4))

End If

Next

End With

TextBox1 = Repro

End Sub




TEST1.xlsm