Refer a column in the 'sumif' function

  • Thread starter Thread starter Kanecha
  • Start date Start date
K

Kanecha

Hi, I am trying to supply column values to the sumif function, but have not
had any success yet. Here's what the macro coded-

Range("B34").Select
ActiveCell.FormulaR1C1 = _
"=SUMIF('LCY Balances'!C6,'By Type'!RC1,'LCY Balances'!C7)"

if simply used in excel this would read as -

=SUMIF('LCY Balances'!$F:$F,'By Type'!$A34,'LCY Balances'!$G:$G)

What I am trying to do is - to make the sumif function sum up values in
sheet "By Type" in the column referred to by a number in row32 of the active
cell/column - in this case 7 (columnG:G)

I've tried to be as detailed as possible but do let me know if you need
further details. Will be glad if somebody offers a solutions soon!

Thanks
 
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
 
Back
Top