Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ckiraly
 
Posts: n/a
Default Counting question


I'm trying to do something that seems easy, but just don't know how to:

I want to count the number of times column B is not blank AND column A
is a specified value. ex:

A B

C 1
C
C 1
M 1
C
C 1

So I'm looking for the number of times that "C" AND "1" occur.

Any help is greatly appreciated.

Thanks!


--
ckiraly
------------------------------------------------------------------------
ckiraly's Profile: http://www.excelforum.com/member.php...o&userid=25044
View this thread: http://www.excelforum.com/showthread...hreadid=385674

  #2   Report Post  
Domenic
 
Posts: n/a
Default


Try...

=SUMPRODUCT(--($A$1:$A$6="C"),--($B$1:$B$6=1))

OR

=SUMPRODUCT(--($A$1:$A$6=D1),--($B$1:$B$6=E1))

...where D1 contains your first criterion, such as C, and E1 contains
your second criterion, such as 1.

Hope this helps!

ckiraly Wrote:
I'm trying to do something that seems easy, but just don't know how to:

I want to count the number of times column B is not blank AND column A
is a specified value. ex:

A B

C 1
C
C 1
M 1
C
C 1

So I'm looking for the number of times that "C" AND "1" occur.

Any help is greatly appreciated.

Thanks!



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=385674

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Two options...

(a)

=SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

where E2 houses a condition like C and F2 a condition like 1.

(b)

In C2 enter & copy down:

=A2&"#"&B2

Then invoke:

=COUNTIF($C$2:$C$10,E2&"#"&F2)

ckiraly wrote:
I'm trying to do something that seems easy, but just don't know how to:

I want to count the number of times column B is not blank AND column A
is a specified value. ex:

A B

C 1
C
C 1
M 1
C
C 1

So I'm looking for the number of times that "C" AND "1" occur.

Any help is greatly appreciated.

Thanks!



--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
  #4   Report Post  
ckiraly
 
Posts: n/a
Default


Thank you both. I will try those solutions out.


--
ckiraly
------------------------------------------------------------------------
ckiraly's Profile: http://www.excelforum.com/member.php...o&userid=25044
View this thread: http://www.excelforum.com/showthread...hreadid=385674

  #5   Report Post  
ckiraly
 
Posts: n/a
Default


The solutions worked great! Now I want to one up it. How can do this
to see if column B is not blank?


--
ckiraly
------------------------------------------------------------------------
ckiraly's Profile: http://www.excelforum.com/member.php...o&userid=25044
View this thread: http://www.excelforum.com/showthread...hreadid=385674



  #6   Report Post  
Alex Delamain
 
Posts: n/a
Default


To count where col A="C" and Col B is not blank change

--($B$1:$B$6=1)

to

--($B$1:$B$6<"")


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=385674

  #7   Report Post  
ckiraly
 
Posts: n/a
Default


Thank you very much! Slowly but surely I'll get the hang of excel.


--
ckiraly
------------------------------------------------------------------------
ckiraly's Profile: http://www.excelforum.com/member.php...o&userid=25044
View this thread: http://www.excelforum.com/showthread...hreadid=385674

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
Counting Question Metalteck Excel Discussion (Misc queries) 1 June 21st 05 09:01 PM
Counting question Carl Excel Discussion (Misc queries) 11 March 11th 05 09:28 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM
Counting data - 1 last question Jo New Users to Excel 1 February 5th 05 11:42 PM
Counting question sjs Excel Discussion (Misc queries) 5 December 2nd 04 09:24 AM


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