Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default SumIf with multiple Criteria

I have a worksheet in a workbook where I need to get a sum from a range of
cells from another worksheet in the same workbook. However, I only want to
sum the values in that range if two different sets of criteria are met on
each row. Example: Worksheet1 cell B5 needs the formula. I want it to sum
all values from worksheet2 column D, only if the cells in column B and column
C on any given row (on worksheet2) match the values in worksheet1 cells A1
and B3 respectively. So for cell D3 to be counted in the sum B3(worksheet2)
must = A1(worksheet1) AND C3(worksheet2) must = B3(worksheet1). As far as I
can tell the SumIf function will only allow you to use one criteria, is there
a way around this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default SumIf with multiple Criteria


=sumproduct(--(yourfirstrange=variable)*(yoursecondrange=2ndvari able),(range))

range = the area to sum

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I have a worksheet in a workbook where I need to get a sum from a range of
cells from another worksheet in the same workbook. However, I only want to
sum the values in that range if two different sets of criteria are met on
each row. Example: Worksheet1 cell B5 needs the formula. I want it to sum
all values from worksheet2 column D, only if the cells in column B and column
C on any given row (on worksheet2) match the values in worksheet1 cells A1
and B3 respectively. So for cell D3 to be counted in the sum B3(worksheet2)
must = A1(worksheet1) AND C3(worksheet2) must = B3(worksheet1). As far as I
can tell the SumIf function will only allow you to use one criteria, is there
a way around this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default SumIf with multiple Criteria

I guess this information should have been included, but the criteria that
need to be matched are text fields. When I use the formula below I receive a
#NUM! error.

"Marcelo" wrote:


=sumproduct(--(yourfirstrange=variable)*(yoursecondrange=2ndvari able),(range))

range = the area to sum

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I have a worksheet in a workbook where I need to get a sum from a range of
cells from another worksheet in the same workbook. However, I only want to
sum the values in that range if two different sets of criteria are met on
each row. Example: Worksheet1 cell B5 needs the formula. I want it to sum
all values from worksheet2 column D, only if the cells in column B and column
C on any given row (on worksheet2) match the values in worksheet1 cells A1
and B3 respectively. So for cell D3 to be counted in the sum B3(worksheet2)
must = A1(worksheet1) AND C3(worksheet2) must = B3(worksheet1). As far as I
can tell the SumIf function will only allow you to use one criteria, is there
a way around this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default SumIf with multiple Criteria

could you please send your formula?
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I guess this information should have been included, but the criteria that
need to be matched are text fields. When I use the formula below I receive a
#NUM! error.

"Marcelo" wrote:


=sumproduct(--(yourfirstrange=variable)*(yoursecondrange=2ndvari able),(range))

range = the area to sum

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I have a worksheet in a workbook where I need to get a sum from a range of
cells from another worksheet in the same workbook. However, I only want to
sum the values in that range if two different sets of criteria are met on
each row. Example: Worksheet1 cell B5 needs the formula. I want it to sum
all values from worksheet2 column D, only if the cells in column B and column
C on any given row (on worksheet2) match the values in worksheet1 cells A1
and B3 respectively. So for cell D3 to be counted in the sum B3(worksheet2)
must = A1(worksheet1) AND C3(worksheet2) must = B3(worksheet1). As far as I
can tell the SumIf function will only allow you to use one criteria, is there
a way around this?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default SumIf with multiple Criteria

I have been through mutiple variations, this is where I am now:

=SUMPRODUCT(--(RDS_DATA!$K:$K=B$4&B$5&$A127)*(RDS_DATA!$J:$J)+SU MPRODUCT(--(RDS_DATA!$C:$C=RIGHT(A4,5))*(RDS_DATA!$J:$J)))

"Marcelo" wrote:

could you please send your formula?
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I guess this information should have been included, but the criteria that
need to be matched are text fields. When I use the formula below I receive a
#NUM! error.

"Marcelo" wrote:


=sumproduct(--(yourfirstrange=variable)*(yoursecondrange=2ndvari able),(range))

range = the area to sum

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I have a worksheet in a workbook where I need to get a sum from a range of
cells from another worksheet in the same workbook. However, I only want to
sum the values in that range if two different sets of criteria are met on
each row. Example: Worksheet1 cell B5 needs the formula. I want it to sum
all values from worksheet2 column D, only if the cells in column B and column
C on any given row (on worksheet2) match the values in worksheet1 cells A1
and B3 respectively. So for cell D3 to be counted in the sum B3(worksheet2)
must = A1(worksheet1) AND C3(worksheet2) must = B3(worksheet1). As far as I
can tell the SumIf function will only allow you to use one criteria, is there
a way around this?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default SumIf with multiple Criteria

sumproduct does not work with the full column range A:A

use a2:A5000 for the first b2:b5000 etc, for eg

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I have been through mutiple variations, this is where I am now:

=SUMPRODUCT(--(RDS_DATA!$K:$K=B$4&B$5&$A127)*(RDS_DATA!$J:$J)+SU MPRODUCT(--(RDS_DATA!$C:$C=RIGHT(A4,5))*(RDS_DATA!$J:$J)))

"Marcelo" wrote:

could you please send your formula?
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I guess this information should have been included, but the criteria that
need to be matched are text fields. When I use the formula below I receive a
#NUM! error.

"Marcelo" wrote:


=sumproduct(--(yourfirstrange=variable)*(yoursecondrange=2ndvari able),(range))

range = the area to sum

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"JudyT" escreveu:

I have a worksheet in a workbook where I need to get a sum from a range of
cells from another worksheet in the same workbook. However, I only want to
sum the values in that range if two different sets of criteria are met on
each row. Example: Worksheet1 cell B5 needs the formula. I want it to sum
all values from worksheet2 column D, only if the cells in column B and column
C on any given row (on worksheet2) match the values in worksheet1 cells A1
and B3 respectively. So for cell D3 to be counted in the sum B3(worksheet2)
must = A1(worksheet1) AND C3(worksheet2) must = B3(worksheet1). As far as I
can tell the SumIf function will only allow you to use one criteria, is there
a way around this?

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
Multiple Criteria for SUMIF Duncan Excel Worksheet Functions 5 May 22nd 08 11:41 PM
sumif multiple criteria Chris Cowles Excel Worksheet Functions 9 May 26th 07 11:06 PM
SumIf with Multiple Criteria DEE Excel Worksheet Functions 4 November 21st 06 10:04 PM
sumif for multiple criteria Inter Excel Discussion (Misc queries) 3 May 17th 06 07:17 PM
Multiple Criteria for SUMIF camerons New Users to Excel 3 May 22nd 05 07:01 PM


All times are GMT +1. The time now is 04:31 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"