Hello,
Hope you are well.
Is it possible to use a combobox value in the SumIfs WorkSheetFunction?
As I have the below code that caculates the Net Value of weights in Column E on Sheet11 if the Farm name and Type of Drying method for grapes is in Column A and C. The Farm name and Drying method is got from two ComboBox. But it calculates to zero.
Can someone please assist or give advice?
Regards
Hope you are well.
Is it possible to use a combobox value in the SumIfs WorkSheetFunction?
As I have the below code that caculates the Net Value of weights in Column E on Sheet11 if the Farm name and Type of Drying method for grapes is in Column A and C. The Farm name and Drying method is got from two ComboBox. But it calculates to zero.
Code:
Dim pResult as Double
Dim nettRang as Range, frmRang as Range, drgRang as Range
With Sheet11[INDENT]Set nettRang = .Range("E:E")
[/INDENT]
Set frmRang = .Range("A:A")
Set drgRang = .Range("C:C")
pResult = Application.WorksheetFunction.SumIfs(nettRang, frmRang, " = " & cbPlFarms.Value, drgRang, " = " & cbPlDroog.Value)
Sheet3.Range("A15").Value = pResult
End With
Can someone please assist or give advice?
Regards
Last edited: