Hello everyone
I have the following code that enables me to grab data from three sheets to the sheet named "TABLEAU"
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$G$1" Then
Dim ws As Worksheet
Dim sh As Worksheet
Dim c As Range
Dim cc As Range
Set sh = Sheets("TABLEAU")
Application.ScreenUpdating = False
For Each c In sh.Range("A9:A11")
For Each ws In ThisWorkbook.Worksheets
If InStr(ws.Name, c.Value) > 0 Then
For Each cc In ws.Range("B5:B" & ws.Cells(Rows.Count, 2).End(xlUp).Row)
If cc.Value = sh.Range("C5").Value Then
c.Offset(, 1).Resize(1, 5).Value = cc.Offset(, 1).Resize(1, 5).Value
Exit For
Else
c.Offset(, 1).Resize(1, 5).Value = ""
End If
Next cc
End If
Next ws
Next c
Application.ScreenUpdating = True
End If
End Sub
Is it possible to use formulas instead?