Hi Forum,
I have a SUMIF that I need to convert into VBA
This gives me the correct result, which tells me how many parts were dispatched on 30/06/2011
However, I need to know how many parts were dispatched from a specific date
The excel formulas equivelent is
=SUMIFS(D:D,C:C,partnumber,E:E, ">29/06/2011")
but as I need this in VBA
My attempt is this, but this returns 0
And ideas?
Thanks
I have a SUMIF that I need to convert into VBA
Code:
MsgBox Application.WorksheetFunction.SumIfs(ws_dispatch.range("D:D"), _
ws_dispatch.range("C:C"), partnumber, _
ws_dispatch.range("E:E"), CDate("30/06/2011"))
This gives me the correct result, which tells me how many parts were dispatched on 30/06/2011
However, I need to know how many parts were dispatched from a specific date
The excel formulas equivelent is
=SUMIFS(D:D,C:C,partnumber,E:E, ">29/06/2011")
but as I need this in VBA
My attempt is this, but this returns 0
Code:
MsgBox Application.WorksheetFunction.SumIfs(ws_dispatch.range("D:D"), _
ws_dispatch.range("C:C"), partnumber, _
ws_dispatch.range("E:E"), ">" & CDate("29/06/2011"))
And ideas?
Thanks