Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
alexy
 
Posts: n/a
Default Totaling criteria from 2 columns


Hi, I have a sheet that has columns D and E, in column D I have size (8,
10 12, etc.) and in E I have Trouser length (29, 31).
They are both discrete numeric values.
How can I get a count of all the rows when d:d=8 and e:e=25 ?

Thanks a lot.


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=sumproduct(--(D2:D100=8),--(e2:E100=25))

you can't use whole columns with SP.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"alexy" wrote in
message ...

Hi, I have a sheet that has columns D and E, in column D I have size (8,
10 12, etc.) and in E I have Trouser length (29, 31).
They are both discrete numeric values.
How can I get a count of all the rows when d:d=8 and e:e=25 ?

Thanks a lot.


--
alexy
------------------------------------------------------------------------
alexy's Profile:

http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835



  #3   Report Post  
mangesh_yadav
 
Posts: n/a
Default


use:
=SUMPRODUCT(--(D1:D100=8),--(E1:E100=25))

Don't use D:D, instead use D1:D100 or any large number

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #4   Report Post  
alexy
 
Posts: n/a
Default


Thanks a lot mate. It's much appreciated.


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #5   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Thanks for the feedback.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=392835



  #6   Report Post  
alexy
 
Posts: n/a
Default


Ok, I've found I've now got a third variable, so I'm going to put all of
my totals onto sheet 2, and have my raw data on sheet 1.
Now I have 2 questions,
1) Can I have a variable that is text (Ie, BT2 in column B, then
numbers in c and d)
2) What is the formula when it's reading from another page?

Thanks once again.


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #7   Report Post  
mangesh_yadav
 
Posts: n/a
Default


=SUMPRODUCT(--(Sheet1!D1:D100="BT2"),--(Sheet1!E1:E100=25))

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #8   Report Post  
alexy
 
Posts: n/a
Default


Is the follwing legitimate?

=SUMPRODUCT(--(Sheet1!B1:B100="BT2,DB,CN,CN3,BT1"),--(Sheet1!D1:D100=6),--(Sheet1!E1:E100=25))


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #9   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Yes. Very much.
Aren't you getting the right answer...?

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #10   Report Post  
alexy
 
Posts: n/a
Default


It is now. Nice one.


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835



  #11   Report Post  
alexy
 
Posts: n/a
Default


Ok, it's wrong, in the
=SUMPRODUCT(--(Sheet1!B1:B100="BT2,DB,CN,CN3,BT1"),--( section, I need
it to be any of the variables, this isn't counting them unless it
satisfies all of them. I want it to be if it's DB or CN or... etc.
How can I acheive this?

God, I didn't realise after 2 years of no excel use it would all be
gone :s.


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #12   Report Post  
mangesh_yadav
 
Posts: n/a
Default


I thought you are searching for the whole string: "BT2,DB,CN,CN3,BT1".
But...


I believe there exists an easier way out, but for the moment here's an
alternative:

=SUMPRODUCT(--(Sheet1!B1:B100="BT2"),--(Sheet1!D1:D100=6),--(Sheet1!E1:E100=25))+SUMPRODUCT(--(Sheet1!B1:B100="DB"),--(Sheet1!D1:D100=6),--(Sheet1!E1:E100=25))

and so on.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #13   Report Post  
mangesh_yadav
 
Posts: n/a
Default


ok. Here it is:

=SUM(--(Sheet1!B1:B100=TRANSPOSE({"BT2";"DB";"CN";"CN3";" BT1"}))*(Sheet1!D1:D100=6)*(Sheet1!E1:E100=25))

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=392835

  #14   Report Post  
alexy
 
Posts: n/a
Default


I swapped the SUM for SUMPRODUCT and it worked fine. Thanks.


--
alexy
------------------------------------------------------------------------
alexy's Profile: http://www.excelforum.com/member.php...o&userid=25905
View this thread: http://www.excelforum.com/showthread...hreadid=392835

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
Copying matched criteria plus relevant columns to new worksheet mattguerilla Excel Discussion (Misc queries) 3 July 29th 05 03:38 PM
Sum Count of Single Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 9 July 14th 05 10:01 PM
Arithmetical Mode of Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 4 July 14th 05 09:15 PM
Having trouble totaling columns in excel 2003, always worked b4 rjmac Excel Worksheet Functions 1 June 24th 05 07:01 PM
SUMIF in multiple columns based on other criteria in Excel? Scott Powell Excel Discussion (Misc queries) 9 April 13th 05 02:32 PM


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