Solved

Limit COUNTA fn to cells whose formula returns any text

Posted on 2011-02-25
8
317 Views
Last Modified: 2012-05-11
I have a spreadsheet which contains formulas down column A to pull in names from another spreadsheet column A.  I will refer to the other spreadsheet as [other].  Each cell in column A contains an IF statement =if([other]A1="","",[other]A1).  The spreadsheet column A looks like:

              COLUMN A
ROW 1:  Name 1
ROW 2:  Name 2
ROW 3:  Name 3
ROW 4:  Name 4
ROW 5:  
ROW 6:  

My problem is that at the bottom of column A, I want to count how many names I have, and not include any cells that contain merely the if statement.  A normal COUNTA(A1:A6) will return 6 but I need it to return 4.

How do I limit the COUNTA function in this way?  Or should I be doing it another way?
0
Comment
Question by:witzph1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 34984442
Use COUNT() instead of COUNTA().
0
 

Author Comment

by:witzph1
ID: 34984460
COUNT returns '0' because it is looking for numbers, not text.
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34984467
Sorry...forgot that you're counting text!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 34984492
Try this:

=COUNTIF(A:A,"?*")

That will ignore blanks, zero-length strings, and numbers.
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34984500
=COUNTA(A1:A8)-COUNTBLANK(A1:A8)
0
 

Author Comment

by:witzph1
ID: 34984545
Mathewspatrick, that works, but not sure I understand why "?*" does what it does.  Very interesting.  

ippinto, that also works.  Alas, Mathewspatrick was slightly quicker on the draw, and his solution is shorter, and thus more elegant.  

But thanks to both for your help!
0
 

Author Closing Comment

by:witzph1
ID: 34984549
Thanks again for your help.
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34984574
Agree! I almost got there... :)
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question