Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Sumif based on two variable

i am trying to get the sum of data from column S that meets criteria from
column b and d-

I have been able to get a count using the following formula:
=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6))

following a few examples I found I tried the following but i keep getting
#Value

=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6),'Sheet2'!$S$6:$S$609)

what am I doing wrong?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumif based on two variable

Do you have any #VALUE! errors in any of the referenced ranges?

Try it like this:

=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr."),--('Sheet2'!$B$6:$B$609='Sheet1'!$C6),'Sheet2'!$S$6: $S$609)

--
Biff
Microsoft Excel MVP


"Memphus01" wrote in message
...
i am trying to get the sum of data from column S that meets criteria from
column b and d-

I have been able to get a count using the following formula:
=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6))

following a few examples I found I tried the following but i keep getting
#Value

=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6),'Sheet2'!$S$6:$S$609)

what am I doing wrong?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sumif based on two variable

The double minus is unnecessary:
=SUMPRODUCT(('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2' !$B$6:$B$609='Sheet1'!$C6),'Sheet2'!$S$6:$S$609)

If you get #value error, that probably means your data in col S contains
#VALUE! error(s). Clean it up, and it should work fine.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"Memphus01" wrote:
i am trying to get the sum of data from column S that meets criteria from
column b and d-

I have been able to get a count using the following formula:
=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6))

following a few examples I found I tried the following but i keep getting
#Value

=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6),'Sheet2'!$S$6:$S$609)

what am I doing wrong?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Sumif based on two variable

Thanks- I went back and I did have some bad data- frustrated me to no end,
but at least I learned something :)

"Max" wrote:

The double minus is unnecessary:
=SUMPRODUCT(('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2' !$B$6:$B$609='Sheet1'!$C6),'Sheet2'!$S$6:$S$609)

If you get #value error, that probably means your data in col S contains
#VALUE! error(s). Clean it up, and it should work fine.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"Memphus01" wrote:
i am trying to get the sum of data from column S that meets criteria from
column b and d-

I have been able to get a count using the following formula:
=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6))

following a few examples I found I tried the following but i keep getting
#Value

=SUMPRODUCT(--('Sheet2'!$D$6:$D$609="Sr.")*('Sheet2'!$B$6:$B$609 ='Sheet1'!$C6),'Sheet2'!$S$6:$S$609)

what am I doing wrong?

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sumif based on two variable

Welcome. Please take a moment to press the YES button (like the one below) in
ALL responses which helped to answer your query
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"Memphus01" wrote:
Thanks- I went back and I did have some bad data- frustrated me to no end,
but at least I learned something :)


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
SUMIF With Variable Consecutive Days Peanut Excel Worksheet Functions 6 May 10th 07 08:02 PM
SumIf for Variable Conditions JP Excel Worksheet Functions 6 November 13th 06 10:31 AM
how to use a variable for the criteria in a sumif function? Dick B. Excel Worksheet Functions 5 May 1st 06 12:55 PM
Sumif with variable target Brisbane Rob Excel Discussion (Misc queries) 2 March 23rd 06 11:20 AM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM


All times are GMT +1. The time now is 02:33 PM.

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"