I have a code that he selected data that I want ,but I want to show this data in a table and not ina MsgBox.
This is my code and I hope that someone can find a solution for me
Private Sub CommandButton1_Click()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim table1 As Range
Dim table2 As Range
Dim table1Rows As Integer
Dim table1Cols As Integer
Set ws1 = Worksheets("Feuil1")
Set ws2 = Worksheets("Feuil2")
Set table1 = ws1.Cells
Set table2 = ws2.Cells
table1Rows = ws1.UsedRange.Rows.Count
table1Cols = ws1.UsedRange.Columns.Count
For i = 1 To table1Rows
For j = 1 To table1Cols
If table1(i, 1).Value <> table2(i, 1).Value Then
MsgBox "Libellé : " & table1(i, 1) & ", du montant : " & table1(i, 3) & " est ajouté !"
End If
Next
Next
End Sub