Summing values in a specific column in a named range

  • Thread starter Thread starter agarwaldvk
  • Start date Start date
A

agarwaldvk

Can someone tell me how do I sum the values in a specific column in
named range. For example, if the range "A1:F100" has been name
"MyRange" and if I only want to add values in the column 'B' dependin
upon some condition being true, then what does my formula need to sa
to add the values in column 'B' only?

Would this be correct "=if(condition, sum(MyRange,2),0)"? I doubt i
though!

There was an entry in the similar vein in one of the pages i
excelforum that I happen to come across but I can't find it now! Ca
someone guide me to that. From what I remember, one of the response
probably were from Alan Beban but I could be wrong here.

Best regards and thanks in advance.


Deepak Agarwa
 
To sum column B in a range named MyRange with the dimensions A1:F100 you
should use

=SUM(INDEX(MyRange,,2))

if there are conditions in let's say column and the criteria is "a" then use

=SUMIF(INDEX(MyRange,,1),"a",INDEX(MyRange,,2))

if multiple conditions with "a" in A and "b" in C use

=SUMPRODUCT(--(INDEX(MyRange,,1)="a"),--(INDEX(MyRange,,3)="b"),INDEX(MyRang
e,,2))





--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
Thanks Paul but what do the 2 minus sign stand for in the sumproduc
function?

Best regards


Deepa
 
Back
Top