Hi
I want to add the values of a column but only for the rows that are marked
with an x in the adjacent column. Like this
A B
1 x
2
3 x
4 x
5
and it should sum up to 8. How would I contruct a function like this ?
Sorry
Missd one vital point. I should ONLY include a row in the sum if the
adjacent column contains an x AND the value in the column is larger then 1.
So there's two conditions that has to be matched otherwise it would be a
sum.ifquot;Andreas Håkanssonquot; gt; skrev i meddelandet
...
gt; Hi
gt;
gt; I want to add the values of a column but only for the rows that are marked
gt; with an x in the adjacent column. Like this
gt;
gt; A B
gt; 1 x
gt; 2
gt; 3 x
gt; 4 x
gt; 5
gt;
gt; and it should sum up to 8. How would I contruct a function like this ?
gt;
Hi!
Try this:
=SUMPRODUCT(--(A1:A5gt;1),--(B1:B5=quot;xquot;),A1:A5)
Biff
quot;Andreas Håkanssonquot; gt; wrote in message
...
gt; Hi
gt;
gt; I want to add the values of a column but only for the rows that are marked
gt; with an x in the adjacent column. Like this
gt;
gt; A B
gt; 1 x
gt; 2
gt; 3 x
gt; 4 x
gt; 5
gt;
gt; and it should sum up to 8. How would I contruct a function like this ?
gt;
=SUMIF(B:B,quot;xquot;,A:A)
-via135
Andreas Håkansson Wrote:
gt; Hi
gt;
gt; I want to add the values of a column but only for the rows that are
gt; marked
gt; with an x in the adjacent column. Like this
gt;
gt; A B
gt; 1 x
gt; 2
gt; 3 x
gt; 4 x
gt; 5
gt;
gt; and it should sum up to 8. How would I contruct a function like this ?--
via135
------------------------------------------------------------------------
via135's Profile: www.excelforum.com/member.php...oamp;userid=26725
View this thread: www.excelforum.com/showthread...hreadid=526342Thanks!
quot;Biffquot; gt; skrev i meddelandet
...
gt; Hi!
gt;
gt; Try this:
gt;
gt; =SUMPRODUCT(--(A1:A5gt;1),--(B1:B5=quot;xquot;),A1:A5)
gt;
gt; Biff
gt;
gt; quot;Andreas Håkanssonquot; gt; wrote in message
gt; ...
gt;gt; Hi
gt;gt;
gt;gt; I want to add the values of a column but only for the rows that are
gt;gt; marked with an x in the adjacent column. Like this
gt;gt;
gt;gt; A B
gt;gt; 1 x
gt;gt; 2
gt;gt; 3 x
gt;gt; 4 x
gt;gt; 5
gt;gt;
gt;gt; and it should sum up to 8. How would I contruct a function like this ?
gt;gt;
gt;
gt;
You're welcome!
Biff
quot;Andreas Håkanssonquot; gt; wrote in message
...
gt; Thanks!
gt;
gt; quot;Biffquot; gt; skrev i meddelandet
gt; ...
gt;gt; Hi!
gt;gt;
gt;gt; Try this:
gt;gt;
gt;gt; =SUMPRODUCT(--(A1:A5gt;1),--(B1:B5=quot;xquot;),A1:A5)
gt;gt;
gt;gt; Biff
gt;gt;
gt;gt; quot;Andreas Håkanssonquot; gt; wrote in message
gt;gt; ...
gt;gt;gt; Hi
gt;gt;gt;
gt;gt;gt; I want to add the values of a column but only for the rows that are
gt;gt;gt; marked with an x in the adjacent column. Like this
gt;gt;gt;
gt;gt;gt; A B
gt;gt;gt; 1 x
gt;gt;gt; 2
gt;gt;gt; 3 x
gt;gt;gt; 4 x
gt;gt;gt; 5
gt;gt;gt;
gt;gt;gt; and it should sum up to 8. How would I contruct a function like this ?
gt;gt;gt;
gt;gt;
gt;gt;
gt;
gt;
- Mar 13 Thu 2008 20:43
Conditional sum
close
全站熱搜
留言列表
發表留言