Hi All
I just learning but I am stuck with sumproduct and sumifs formula in vba
I create a button to calculate invoices from column A invoices, I used a macro but i would prefer it in vba
Is it possible to have the correct vba code for sumproduct and sumifs .
Does sumifs vba code work on excel 2002 and 2003 version.
I need to test on old version of excel
So far sumproduct is bringing me issues !!!1
Thanks if someone can help.
Macro recorder for sumproduct
macrorecorder for sumifs
Mod Edit: Code Tags added
I just learning but I am stuck with sumproduct and sumifs formula in vba
I create a button to calculate invoices from column A invoices, I used a macro but i would prefer it in vba
Is it possible to have the correct vba code for sumproduct and sumifs .
Does sumifs vba code work on excel 2002 and 2003 version.
I need to test on old version of excel
So far sumproduct is bringing me issues !!!1
Thanks if someone can help.
Macro recorder for sumproduct
Code:
' InvoiceAmtcalculation Macro
' Invoice calculation per invoices issued
'
'
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveCell.FormulaR1C1 = "=SUMPRODUCT(R2C17:R410C17,--(R2C1:R410C1=RC[-1]))"
Range("AB2").Select
Selection.AutoFill Destination:=Range("AB2:AB36")
Range("AB2:AB36").Select
ActiveWindow.SmallScroll Down:=27
End Sub
macrorecorder for sumifs
Code:
Sub SUMIFINVOICESCALCULATION()
'
' SUMIFINVOICESCALCULATION Macro
' CALCULATE INVOICES SEPARATELY
'
'
Range("AB2").Select
ActiveCell.FormulaR1C1 = "=SUMIFS(R2C17:R410C17,R2C1:R410C1,RC[-1])"
Range("AB2").Select
Selection.AutoFill Destination:=Range("AB2:AB36")
Range("AB2:AB36").Select
End Sub
Mod Edit: Code Tags added
Attachments
Last edited by a moderator: