I would like to put the following functions in the cells of a given column if someone clicks on the button of a userform:
=IF(A3<>"";SUMIF(Items!$A:$A;"*"&Summary!$A:$A&"*";Items!$E:$E);"")
Should I go for an If and Then structure or create a user defined function?
And how could I express that (especially the wildcard part)?
'add gross value
Dim j As Integer
Dim Count As Double
Dim Item As Object
Count = WorksheetFunction.CountA(Sheets("Items"), Range("E:E"))
For j = 3 To Count
For Each Item In Sheets("Summary").Cells(j, 1)
If Sheets("Summary").Cells(j, 1) = Sheets("Items").Cells(j, 1) Then
'besoin de définir la fonction somme
Sum Sheets("Items").Cells(j, 5)
End If
Next
Next
End Sub
Bookmarks