Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default countif when 2 values in a cell

I'm using 1 column. It will contain A, B, C, D, etc. My countif works great
when I count A's, B's etc. But there are times there is an AB or A B in the
cell. It neither counts the A or the B. Any suggestions. I see some solutions
of countif were pivot tables. If that's my solution, I'll need beginner help.
Thanks to all.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif when 2 values in a cell

**Maybe** something like this:

=COUNTIF(A1:A10,"*A*")

That will count any cell that contains an A anywhere in the cell.

If you use a cell reference:

B1 = A

=COUNTIF(A1:A10,"*"&B1&"*")

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
I'm using 1 column. It will contain A, B, C, D, etc. My countif works
great
when I count A's, B's etc. But there are times there is an AB or A B in
the
cell. It neither counts the A or the B. Any suggestions. I see some
solutions
of countif were pivot tables. If that's my solution, I'll need beginner
help.
Thanks to all.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default countif when 2 values in a cell

Thank you! I used the wildcard - it reminded me of my days in DOS!

"T. Valko" wrote:

**Maybe** something like this:

=COUNTIF(A1:A10,"*A*")

That will count any cell that contains an A anywhere in the cell.

If you use a cell reference:

B1 = A

=COUNTIF(A1:A10,"*"&B1&"*")

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
I'm using 1 column. It will contain A, B, C, D, etc. My countif works
great
when I count A's, B's etc. But there are times there is an AB or A B in
the
cell. It neither counts the A or the B. Any suggestions. I see some
solutions
of countif were pivot tables. If that's my solution, I'll need beginner
help.
Thanks to all.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif when 2 values in a cell

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
Thank you! I used the wildcard - it reminded me of my days in DOS!

"T. Valko" wrote:

**Maybe** something like this:

=COUNTIF(A1:A10,"*A*")

That will count any cell that contains an A anywhere in the cell.

If you use a cell reference:

B1 = A

=COUNTIF(A1:A10,"*"&B1&"*")

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
I'm using 1 column. It will contain A, B, C, D, etc. My countif works
great
when I count A's, B's etc. But there are times there is an AB or A B in
the
cell. It neither counts the A or the B. Any suggestions. I see some
solutions
of countif were pivot tables. If that's my solution, I'll need beginner
help.
Thanks to all.






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 331
Default countif when 2 values in a cell

Hi. This post has helped me, but only to a point.

I am trying to calculate something along the lines of, "COUNT If there is a
":" in a cell in column A (Due to the cell being a time), and colum B is
greater than 89.9"

I used your idea to be able to count all the cells in Column A by using
=COUNTIF(A:A,"*:*") but I can't figure out the look-up part to count column B.

Any ideas?

Thank you in advance,
Greg

"T. Valko" wrote:

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
Thank you! I used the wildcard - it reminded me of my days in DOS!

"T. Valko" wrote:

**Maybe** something like this:

=COUNTIF(A1:A10,"*A*")

That will count any cell that contains an A anywhere in the cell.

If you use a cell reference:

B1 = A

=COUNTIF(A1:A10,"*"&B1&"*")

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
I'm using 1 column. It will contain A, B, C, D, etc. My countif works
great
when I count A's, B's etc. But there are times there is an AB or A B in
the
cell. It neither counts the A or the B. Any suggestions. I see some
solutions
of countif were pivot tables. If that's my solution, I'll need beginner
help.
Thanks to all.








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default countif when 2 values in a cell

The problem is that the cell is a number (that's what dates and times are to
excel) and you see the colons because of the way the cell is formatted.

Change the format to General and you'll see that there's no colon in the value
of that cell.

So if all your times are less than Midnight (24 hour clock) and there are no
other numbers between 0 and 1 in that range:

=sumproduct(--(isnumber(a1:a10)),--(a1:a10=0),--(a1:a10<1))

0 is midnight of the day.
1 is midnight of the next day.

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


Greg wrote:

Hi. This post has helped me, but only to a point.

I am trying to calculate something along the lines of, "COUNT If there is a
":" in a cell in column A (Due to the cell being a time), and colum B is
greater than 89.9"

I used your idea to be able to count all the cells in Column A by using
=COUNTIF(A:A,"*:*") but I can't figure out the look-up part to count column B.

Any ideas?

Thank you in advance,
Greg

"T. Valko" wrote:

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
Thank you! I used the wildcard - it reminded me of my days in DOS!

"T. Valko" wrote:

**Maybe** something like this:

=COUNTIF(A1:A10,"*A*")

That will count any cell that contains an A anywhere in the cell.

If you use a cell reference:

B1 = A

=COUNTIF(A1:A10,"*"&B1&"*")

--
Biff
Microsoft Excel MVP


"terryc" wrote in message
...
I'm using 1 column. It will contain A, B, C, D, etc. My countif works
great
when I count A's, B's etc. But there are times there is an AB or A B in
the
cell. It neither counts the A or the B. Any suggestions. I see some
solutions
of countif were pivot tables. If that's my solution, I'll need beginner
help.
Thanks to all.







--

Dave Peterson
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
COUNTIF Multiple Values Risky Dave Excel Worksheet Functions 3 March 12th 08 02:00 PM
Countif with multiple text values in cell Rothman Excel Discussion (Misc queries) 3 February 25th 08 03:46 AM
COUNTIF values are 0 Dave F Excel Worksheet Functions 3 August 16th 06 08:56 AM
How do you use countif for values in every four cell in a row Ring eye Excel Worksheet Functions 9 January 19th 06 10:55 PM
Countif between two values Ronbo Excel Worksheet Functions 2 December 21st 04 07:52 PM


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