ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I count nonblank cells that meet criteria in another cell? (https://www.excelbanter.com/excel-worksheet-functions/100236-how-do-i-count-nonblank-cells-meet-criteria-another-cell.html)

jimswinder

How do I count nonblank cells that meet criteria in another cell?
 
I need to add nonblank cells (cells have text) in a column that equal the
criteria of another cell. So I want to add the cells in Column C that have
text but also equal the date in Column A (which is equal to the date in Cell
A1).

I have tried the follwoing:
=SUM(IF(A2:A19=A1,IF(C3:C19="x",1,0)))
=COUNT(IF((A2:A19=A1),C2:C19))
=IF((A2:A19)=A1,COUNTIF(C2:C19,"x"))

Thanks for any help on this matter... I am sure it is an easy fix.

Domenic

How do I count nonblank cells that meet criteria in another cell?
 
The ranges need to be the same size. Try...

=SUM(IF(A2:A19=A1,IF(C2:C19="x",1,0)))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
jimswinder wrote:

I need to add nonblank cells (cells have text) in a column that equal the
criteria of another cell. So I want to add the cells in Column C that have
text but also equal the date in Column A (which is equal to the date in Cell
A1).

I have tried the follwoing:
=SUM(IF(A2:A19=A1,IF(C3:C19="x",1,0)))
=COUNT(IF((A2:A19=A1),C2:C19))
=IF((A2:A19)=A1,COUNTIF(C2:C19,"x"))

Thanks for any help on this matter... I am sure it is an easy fix.


jimswinder

How do I count nonblank cells that meet criteria in another cell?
 
Domenic:

Thanks that worked....what do I need to replace "x" with in the formula if I
want it to find ANY text (non blank cells)?

"jimswinder" wrote:

I need to add nonblank cells (cells have text) in a column that equal the
criteria of another cell. So I want to add the cells in Column C that have
text but also equal the date in Column A (which is equal to the date in Cell
A1).

I have tried the follwoing:
=SUM(IF(A2:A19=A1,IF(C3:C19="x",1,0)))
=COUNT(IF((A2:A19=A1),C2:C19))
=IF((A2:A19)=A1,COUNTIF(C2:C19,"x"))

Thanks for any help on this matter... I am sure it is an easy fix.


Domenic

How do I count nonblank cells that meet criteria in another cell?
 
In article ,
jimswinder wrote:

Domenic:

Thanks that worked....


You're welcome!

what do I need to replace "x" with in the formula if I
want it to find ANY text (non blank cells)?


Try...

=SUM(IF(A2:A19=A1,IF(C2:C19<"",1,0)))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

jimswinder

How do I count nonblank cells that meet criteria in another ce
 
Thanks once again....that will do it.

"Domenic" wrote:

In article ,
jimswinder wrote:

Domenic:

Thanks that worked....


You're welcome!

what do I need to replace "x" with in the formula if I
want it to find ANY text (non blank cells)?


Try...

=SUM(IF(A2:A19=A1,IF(C2:C19<"",1,0)))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!


jimswinder

How do I count nonblank cells that meet criteria in another ce
 
Well...it worked in my very simple test spreadsheet...but not my actual one
where I have several different worksheets....one where I am putting the
formula and another where it is looking for/at the data. I don't know how I
could explain or show you what I am actually wanting to do without sending
you the spreadsheet.

"Domenic" wrote:

In article ,
jimswinder wrote:

Domenic:

Thanks that worked....


You're welcome!

what do I need to replace "x" with in the formula if I
want it to find ANY text (non blank cells)?


Try...

=SUM(IF(A2:A19=A1,IF(C2:C19<"",1,0)))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!


Domenic

How do I count nonblank cells that meet criteria in another ce
 
Is the formula returning an error message? If so, which one? Or are
you getting an incorrect result?

In article ,
jimswinder wrote:

Well...it worked in my very simple test spreadsheet...but not my actual one
where I have several different worksheets....one where I am putting the
formula and another where it is looking for/at the data. I don't know how I
could explain or show you what I am actually wanting to do without sending
you the spreadsheet.


jimswinder

How do I count nonblank cells that meet criteria in another ce
 
an incorrect result...it always comes up as "0"

"Domenic" wrote:

Is the formula returning an error message? If so, which one? Or are
you getting an incorrect result?

In article ,
jimswinder wrote:

Well...it worked in my very simple test spreadsheet...but not my actual one
where I have several different worksheets....one where I am putting the
formula and another where it is looking for/at the data. I don't know how I
could explain or show you what I am actually wanting to do without sending
you the spreadsheet.



Domenic

How do I count nonblank cells that meet criteria in another ce
 
In article ,
jimswinder wrote:

an incorrect result...it always comes up as "0"


Are you confirming the formula with CONTROL+SHIFT+ENTER?

jimswinder

How do I count nonblank cells that meet criteria in another ce
 
Sorry...I didn't know about the CONTROL+SHIFT+ENTER.

When I do that, it doe now work, but it has put brackets { } around the
whole formula. What does that mean?


"Domenic" wrote:

In article ,
jimswinder wrote:

an incorrect result...it always comes up as "0"


Are you confirming the formula with CONTROL+SHIFT+ENTER?


Domenic

How do I count nonblank cells that meet criteria in another ce
 
In article ,
jimswinder wrote:

Sorry...I didn't know about the CONTROL+SHIFT+ENTER.

When I do that, it doe now work, but it has put brackets { } around the
whole formula. What does that mean?


It indicates that you've entered the array formula correctly. For
additional information, see the help menu under 'array formula'.

David Biddulph

How do I count nonblank cells that meet criteria in another ce
 
"jimswinder" wrote in message
...

"Domenic" wrote:

In article ,
jimswinder wrote:

an incorrect result...it always comes up as "0"


Are you confirming the formula with CONTROL+SHIFT+ENTER?


Sorry...I didn't know about the CONTROL+SHIFT+ENTER.

When I do that, it doe now work, but it has put brackets { } around the
whole formula. What does that mean?


It means it's an array formula.
--
David Biddulph



jimswinder

How do I count nonblank cells that meet criteria in another ce
 
How come the formula did not work until I did the CONTROL +SHIFT+ENTER??

"Domenic" wrote:

In article ,
jimswinder wrote:

Sorry...I didn't know about the CONTROL+SHIFT+ENTER.

When I do that, it doe now work, but it has put brackets { } around the
whole formula. What does that mean?


It indicates that you've entered the array formula correctly. For
additional information, see the help menu under 'array formula'.


David Biddulph

How do I count nonblank cells that meet criteria in another ce
 
"jimswinder" wrote in message
...

"Domenic" wrote:

In article ,
jimswinder wrote:

Sorry...I didn't know about the CONTROL+SHIFT+ENTER.

When I do that, it doe now work, but it has put brackets { } around the
whole formula. What does that mean?


It indicates that you've entered the array formula correctly. For
additional information, see the help menu under 'array formula'.


How come the formula did not work until I did the CONTROL +SHIFT+ENTER??


Because until then you didn't have an array formula.

As stated above:
"For additional information, see the help menu under 'array formula'."
--
David Biddulph




All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com