Cellardoor
Member
Dear
I want to build the sumifs function in VBA
I've allready these commands in a specific worksheet
The thing is that, placed like this, the formula should be returning:
=SUMIFS(Table1[em EUR],Table1[Unidade Negócio],"Company1"), but insted it is returning:
=SUMIFS(Table1[em EUR],Table1[Unidade Negócio],$A:$A)
What's wrong in here?
Thank you all
Best Regards
I want to build the sumifs function in VBA
I've allready these commands in a specific worksheet
Code:
Dim c1 As String, c2 As String, c3 As String, c4 As String
c1="Company1"
c3="Company2"
c3="Company3"
Range("C9").Select - ' where the formula should be placed
ActiveCell.FormulaR1C1 = _
"=SUMIFS(Table1[em EUR],Table1[Unidade Negócio],c1)"
The thing is that, placed like this, the formula should be returning:
=SUMIFS(Table1[em EUR],Table1[Unidade Negócio],"Company1"), but insted it is returning:
=SUMIFS(Table1[em EUR],Table1[Unidade Negócio],$A:$A)
What's wrong in here?
Thank you all
Best Regards