Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Add a column based on criteria from 2 other columns

Column_A Column_B Column_C
2 75 250
2 75 500
3 76 350
4 70 1000

I want to add up column C, if column_A = 2 and column_B = 75. Can someone
help me out with this?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Add a column based on criteria from 2 other columns

Try this:

=SUMPRODUCT(--(A1:A4=2),--(B1:B4=75),C1:C4)

Better to use cells to hold the criteria:

E1 = 2
F1 = 75

=SUMPRODUCT(--(A1:A4=E1),--(B1:B4=F1),C1:C4)

--
Biff
Microsoft Excel MVP


"cudan" wrote in message
...
Column_A Column_B Column_C
2 75 250
2 75 500
3 76 350
4 70 1000

I want to add up column C, if column_A = 2 and column_B = 75. Can someone
help me out with this?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Add a column based on criteria from 2 other columns

Enter anywhere other than the sum range

=Sumproduct(--(a1:a100=2),--(b1:b100=75),(c1:c100))

Adjust 100 to the last row you want to include in your sum.

"cudan" wrote:

Column_A Column_B Column_C
2 75 250
2 75 500
3 76 350
4 70 1000

I want to add up column C, if column_A = 2 and column_B = 75. Can someone
help me out with this?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Add a column based on criteria from 2 other columns

Try this:

=SUMPRODUCT((A1:A10=2)*(B1:B10=75),C1:C10)

Adjust ranges to suit your data.

Hope this helps.

Pete

On Nov 4, 10:16*pm, cudan wrote:
Column_A *Column_B * Column_C
2 * * * * * * * * * *75 * * * * * *250
2 * * * * * * * * * *75 * * * * * *500
3 * * * * * * * * * *76 * * * * * *350
4 * * * * * * * * * *70 * * * * * *1000

I want to add up column C, if column_A = 2 and column_B = 75. Can someone
help me out with this?

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Add a column based on criteria from 2 other columns

Hi,

As an alternative, you can also use the following array formula
(Ctrl+Shift+Enter)

=sum(if((rangeA=2)*(rangeB=75),rangeC))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"cudan" wrote in message
...
Column_A Column_B Column_C
2 75 250
2 75 500
3 76 350
4 70 1000

I want to add up column C, if column_A = 2 and column_B = 75. Can someone
help me out with this?

Thanks


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
Adding data in columns based on criteria in more than one column.. Setts Excel Worksheet Functions 6 June 21st 08 07:23 AM
Count based on criteria from two different columns ba374 Excel Discussion (Misc queries) 2 November 13th 07 04:41 PM
sum items in a column based on criteria located in other columns Kurt Excel Discussion (Misc queries) 1 August 2nd 06 05:12 PM
sumproduct 2 columns based on criteria in 3rd column excel guru i''m not Excel Discussion (Misc queries) 5 December 31st 05 03:47 PM
move contents of column C based on criteria related to column A Debra Excel Discussion (Misc queries) 2 December 27th 05 10:25 PM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"