#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andreas Håkansson
 
Posts: n/a
Default Conditional sum

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 ?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andreas Håkansson
 
Posts: n/a
Default Conditional sum

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.if


"Andreas Håkansson" skrev i meddelandet
...
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 ?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Conditional sum

Hi!

Try this:

=SUMPRODUCT(--(A1:A51),--(B1:B5="x"),A1:A5)

Biff

"Andreas Håkansson" wrote in message
...
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 ?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andreas Håkansson
 
Posts: n/a
Default Conditional sum

Thanks!

"Biff" skrev i meddelandet
...
Hi!

Try this:

=SUMPRODUCT(--(A1:A51),--(B1:B5="x"),A1:A5)

Biff

"Andreas Håkansson" wrote in message
...
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 ?





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Conditional sum

You're welcome!

Biff

"Andreas Håkansson" wrote in message
...
Thanks!

"Biff" skrev i meddelandet
...
Hi!

Try this:

=SUMPRODUCT(--(A1:A51),--(B1:B5="x"),A1:A5)

Biff

"Andreas Håkansson" wrote in message
...
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 ?









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
via135
 
Posts: n/a
Default Conditional sum


=SUMIF(B:B,"x",A:A)

-via135



Andreas Håkansson Wrote:
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 ?



--
via135
------------------------------------------------------------------------
via135's Profile: http://www.excelforum.com/member.php...o&userid=26725
View this thread: http://www.excelforum.com/showthread...hreadid=526342

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Format Not Working KMH Excel Discussion (Misc queries) 0 December 22nd 05 05:32 PM
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 10th 05 11:48 PM
VLOOKUP & Conditional Formating Help. Excel'ed Failures Excel Discussion (Misc queries) 6 August 16th 05 04:46 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"