#### How do I count non blank rows only?

```This seems so simple but I've spent hours without resolution.   In column A,
I need to count the number of rows that actually have data in them.  If there
is no data, I need to keep column A blank.  Here's an oversimplied example of
my simple list.

1  John Doe
2  Susan Smith
3  Joe Dear

In column A now I have  =COUNTA(\$B\$2:B64)  and that works great until you
hit a row with no data.

I have tried all these:
=IF(G69>0,(=COUNTA(\$B\$2:B69))," ")

Also   =COUNTIF(\$B\$2:B69,">0")

There's got to be an easy way that I'm missing!!  HEEEELP please.

Thank you,
Susan
```
 0
MC (41)
6/22/2008 1:30:01 PM
excel.newusers 15348 articles. 2 followers.

3 Replies
824 Views

Similar Articles

[PageSpeed] 43

```=COUNTA(B:B)
will count all the non-empty entries in column B
--
Gary''s Student - gsnu200793

"Susan Mc" wrote:

> This seems so simple but I've spent hours without resolution.   In column A,
> I need to count the number of rows that actually have data in them.  If there
> is no data, I need to keep column A blank.  Here's an oversimplied example of
> my simple list.
>
> 1  John Doe
> 2  Susan Smith
> 3  Joe Dear
>
> In column A now I have  =COUNTA(\$B\$2:B64)  and that works great until you
> hit a row with no data.
>
> I have tried all these:
>          =IF(G69>0,(=COUNTA(\$B\$2:B69))," ")
>
> Also   =COUNTIF(\$B\$2:B69,">0")
>
> There's got to be an easy way that I'm missing!!  HEEEELP please.
>
> Thank you,
> Susan
```
 0
GarysStudent (1572)
6/22/2008 2:13:00 PM
```Hi Susan,

Not sure but it sounds like you need something to put in A2 and drag down.
Maybe this  =IF(B2="","",COUNTA(B\$2:B2))

HTH
Martin

"Susan Mc" <Susan Mc@discussions.microsoft.com> wrote in message
news:BFE40A02-2E93-476D-94D6-30C0469868A4@microsoft.com...
> This seems so simple but I've spent hours without resolution.   In column
> A,
> I need to count the number of rows that actually have data in them.  If
> there
> is no data, I need to keep column A blank.  Here's an oversimplied example
> of
> my simple list.
>
> 1  John Doe
> 2  Susan Smith
> 3  Joe Dear
>
> In column A now I have  =COUNTA(\$B\$2:B64)  and that works great until you
> hit a row with no data.
>
> I have tried all these:
>         =IF(G69>0,(=COUNTA(\$B\$2:B69))," ")
>
> Also   =COUNTIF(\$B\$2:B69,">0")
>
> There's got to be an easy way that I'm missing!!  HEEEELP please.
>
> Thank you,
> Susan

```
 0
htmw (80)
6/22/2008 2:33:58 PM
```COUNTA will count only non-blank cells.

What are you trying achieve with your formula(s) in column A?

Where does G69 come into play?

Maybe  =IF(B2="","",COUNTA(\$B\$2:B64))

Entered in A2 and copied down?

Gord Dibben  MS Excel MVP

On Sun, 22 Jun 2008 06:30:01 -0700, Susan Mc <Susan
Mc@discussions.microsoft.com> wrote:

>This seems so simple but I've spent hours without resolution.   In column A,
>I need to count the number of rows that actually have data in them.  If there
>is no data, I need to keep column A blank.  Here's an oversimplied example of
>my simple list.
>
>1  John Doe
>2  Susan Smith
>3  Joe Dear
>
>In column A now I have  =COUNTA(\$B\$2:B64)  and that works great until you
>hit a row with no data.
>
>I have tried all these:
>         =IF(G69>0,(=COUNTA(\$B\$2:B69))," ")
>
>Also   =COUNTIF(\$B\$2:B69,">0")
>
>There's got to be an easy way that I'm missing!!  HEEEELP please.
>
>Thank you,
>Susan

```
 0
Gord
6/22/2008 2:35:44 PM

Similar Artilces:

Conditional Formatting
I have read & tried several CF solutions, but they are not working for me. I am working with Today() date, Due_Date, & days_late. I have a formula in the days_late column =IF(OR(TODAY()<Due_Date,J9="COMPLETED")," ",TODAY()-Due_Date). This formula gives me days_late or leaves that column blank (" "). I want 5 cells to turn red if days_late>1. All my attempts at CF have also turned the blank (" ") cells red also. I have tried ISBLANK and NOT(ISBLANK). -- pls Your problem is that " " is not blank. I know it looks...

Non-Scrolling Background inside CScrollView
Hi everybody, i have some problem i am trying to get working the last few days. I derived an scrollview class from csrollview and opened (created) it inside another cformview so that is is behaving like a control). It is similar to the example called ViewInDialog (a scrollable view inside a dialog) from codeguru or codeproject. I want to use this scrollview to list address entries and the view is only vertically scrollable. The view has (should have) a bitmap background. I 've chosen the cscrollview to be able to place buttons (via create) on the view. I want to use the buttons to jump t...

Pivot table and counting.
I have a pivot table that gives me the number of rides done by a van. I can have the pivot table return the number of rides, but what I need is the number vans that participated for a certain day. Example, it is possible to have 27 trips done by 18 vans, how can I count the number of vans and not addup the van number? Any help appreciated. Thank you, Joe Hi Joe We need a bit more information on how your source data table is set up. What information do you have in each column? -- Regards Roger Govier sacredarms <sacredarms@discussions.microsoft.com> wrote: > I have a pi...

Impossible to delete non-associated mailbox
Hi, I have an Exchange mailbox not associated to any AD user and I can't delete it. It is not marked with the X so the purge option in the context menu is disabled. How can I delete it? Thanks in advance -- Faustino Dina -------------------------------------------------------- If my email address starts with two 'f' drop the first 'f' when mailing me. Hello Faustino: Try this for Exchange 2003: Right click the Mailbox folder under the mailbox store and then select Run Cleanup Agent. You should then see the red X. Regards, Martin MCSA: M "faustino Dina" &...

Excluding Rows During Printout

Cycle Counting
Hello, I am looking for ideas on how to cycle count serial number tracked items without increasing workload. Our serialized items are barcoded but the problem is the are situated on the pallet incorrectly and the pallet is placed on a third level of a racking system. If we could just cycle count based on item count and not include the serial number it would make it easy. Is this possible in Great Plains. We are running Great Plains 8.0. Any suggestions are greatly aprreciated. Thank You, Brian Morris Database Administrator ...

Count
Hi, I would like to know how which formula I should use to count some codes & to ignore the duplicated codes, for example in column A: Code 1234 4321 4321 1234 1234 3214 Now, I want Excel to count & the result is 3 which are: 1234-4321-3214 Yes I can use PivotTable, but I would like to use a formula because I have to deal with this every day. I appreciate your support. -- MFS22 COUNTIF will do it. =COUNTIF(Rng,Rng), where the criterion is the same as the range: e.g =COUNTIF(A3:A8,A3:A8) HTH Peter "MFS" wrote: > Hi, > I wo...

How do I count the # of times a value reoccurs and plot it over ti
I wish to plot a number of errors made by each users and compare it over time. I have a column of user ID's and a column of dates. I want the chart to count the number of times each user ID appears and plot against it's corresponding date. However, each time I try to do this, the chart appears wrong. Any ideas? In article <9595B2A1-8282-4AB3-8511-A6776E108164@microsoft.com>, Stephen@discussions.microsoft.com says... > I wish to plot a number of errors made by each users and compare it over > time. I have a column of user ID's and a column of dates. I want t...

Line count
I am working with a program called Dictaphone. We use Word 2007 in this program. The line count on Dictaphone and the line count in Word 2007 are different even though the Dictaphone text is retrieved from Word 2007. Why would they be different? What is the difference between virutal line count and physical line count? ...

Populate Blank Fields with "0" based on checkmark.
I have a form with 20 fields. The user enters data into some but not all of the fields depending on where they collected data. Is it possible to create a checkbox where, after the user enters their data, they click the checkbox, and any of the 20 fields that are blank get populated with a 0? Thanks for the help. Is there any reason you want them to be zero? If they are numeric fields, you can set the default to zero in table design view. There is no need to use a checkbox, you can arrange it so any empty fields are converted to zero when you move to another record or exit th...

hi I am trying to read the values from a excel row. There are 89 columns for each row and same number of data in each rows. Kindly help regards shantanu shantanu, You need to explain how/where you want to read them.... From another workbook, another worksheet, a VBA function, a macro, a C# application? HTH, Bernie MS Excel MVP "shantanu" <shantanusenin@gmail.com> wrote in message news:1184298794.259390.216180@i38g2000prf.googlegroups.com... > hi > I am trying to read the values from a excel row. There are 89 > columns for each row and same number of da...

count number of characters in rich edit control
How can i count number of characters in rich edit control 2 If u mean controls of type Rich TextBox control, try RichControl1 RC1; CString Mes=RC.GetText(); int n=Mes.GetLength(); "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i count number of characters in rich edit control 2 EM_GETTEXTLENGTHEX, WM_GETTEXTLENGTH, WM_GETTEXT, EM_STREAM* "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i co...

Extra Blank Lines
The following macro imports a text file and sorts horse races in time order and puts a blank line in between each race time (which is at the end of the code), which it does admirably. I had some valuable help with this project from group members recently. However, it does create quite a few blank lines en bloc. It's not really a problem, as I search them out and do a delete. Below is the code which a member might use in order to find the cause of the blank lines? Sub Macro1() Range("A2:J601").Select Selection.ClearContents Range("A2").Select ...

double-click in between two rows or two columns
How to avoid cursor jumping around to different positions when I double-click in between two rows or two column ? Thanks Hi This is a feature of Excel! When you double click the border of the selected cell, the cursor will go to the edge of the contiguous data on the sheet. It's very useful for jumping to the start/end of data. I don't know of a way to disable it. -- Andy. "Ben" <anonymous@discussions.microsoft.com> wrote in message news:bf5d01c4382c\$a19b1bf0\$a601280a@phx.gbl... > How to avoid cursor jumping around to different positions > when I double-c...

Counting sales
I have two different datasets. Each with a common identifier. I need a formula that will reference the identifiers in both datasets and count the number of sales a particular agent made. Example. look up this identifier in the other dataset and then give me the value that is 2 columns over from the identifier in the second dataset. See if this helps: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "Dave" <Dave@discussions.microsoft.com> wrote in message news:E7245B37-033F-400E-9CEE-9822BE7CB0F5@microsoft.com... >I have two...

From Rows to Columun #3
I have data in rows, I want to past to columns so i can import intio access... HELP Example (Current data) 3 42 42 3 38 38 4 22 I want to move to 3 42 42 3 38 38 4 22 THANKS ...

COUNT ? need formula
Hi, I want to track the results of my teams sales performance. I record if it is a sale, no sale, cancelled etc in column M. I thought I'd be able to use the COUNT function/formula to be able to search for all the SALES in column M and place the result in a cell ( column O )but I can't work it out. Any ideas? Damian Hi! Try this: =COUNTIF(M1:M100,"sale") Biff "Diamond Jones" <kwanzaNOSPAM@optusnet.com.au> wrote in message news:43a0e897\$0\$17704\$afc38c87@news.optusnet.com.au... > Hi, > > I want to track the results of my teams sales perf...

Counting Cells with Conditional Formatting
Is there a way to look at a row of data that is either highlighted yellow or red and to count only the data that is highlighted yellow and give me that number? None of my data is numerical....just one letter data, i.e.: "S" or "U" I just want to count how many of the cells are highlighted yellow in a specific row, if that makes more sense. Here's a UDF (Put in a Standard module) and use it in cell A1, like =CountByColor(A8:H8,6) << where 6 (at present) = Yellow = change to =CountByColor(A8:H8,3) to get the reds HTH Function CountByColor(InRa...

Trying to open a blank document
Every time I open Word a particular document opens with it. I seem to be unable to open a blank document. I deleted the document that appears every time I open Word and still that same document is there when I open Word and /or a new blank page on Word. Any advice on how to correct this? See http://word.mvps.org/faqs/apperrors/blankdocnotblank.htm. -- Stefan Blom Microsoft Word MVP "Chairlady1" <Chairlady1@discussions.microsoft.com> wrote in message news:C7D6D85F-9ED4-4D23-944A-8A977F9F672A@microsoft.com... > Every time I open Word a particular docum...

Count Function
I am creating a report for the number of pupils being collected at a certain collection time e.g. 14:00hr and 15:00hrs using the formula =Count([Child Last Name]) in the collection time footer However when i try to count the overall number of pupils in the footer using the same formula, 'Error' appears on screen? Thanks There are potentially a dozen footer sections in a report. Which one is giving you a problem? What is the name of the control? What is the exact formula? -- Duane Hookom Microsoft Access MVP "ELo" wrote: > I am creating a r...

Counting a count
How do I count a count?? This is what im trying to do: I have a database with a table named tblMain and has incorporated everything within that table but contains info from about 8 other tables. I have not doesigned this database and it appears to have a very poor structure...anyway There are three fields involved in this process...'Request' (either 'dispensation', 'waiver' or 'dispensation and waiver'), 'Department' (which consists of 7 other drop down menu options) and 'RequestStatus' which contains the status of each request by another...

Count Problem
Hi I have 20 cells in a single column in a sheet called "Audits" All the cells have a formula in them. The formula is a simple one that reads whatever I put into a cell on a different worksheet called "Names" ie: =Names!A1 = Names!A2 etc etc I would like to have a formula that counts up all the results I get in the sheet called "Audits" At the moment if I enter (let say) 15 names in the "Names" sheet the result is that I see the same 15 names in the "Audits" sheet, however the COUNTA formula returns a total of 20. SO obviously...

Merging of rows.
I have a excel sheet in which there is data in only one column. The data is spread in 2 or 3 rows and after that there is blank row. The data spread in these row is related to one row. I want to bring this spread data in one row. Blank row can be as it is between ro useful data rows. Maybe a macro would do it: Option Explicit Sub testme() Dim CurWks As Worksheet Dim NewWks As Worksheet Dim DestCell As Range Dim BigArea As Range Dim SmallArea As Range Set CurWks = Worksheets("Sheet1") Set NewWks = Worksheets.Add Set DestCell ...

unique or distinct count from xml
How to get a unique count from a xml <Orders> <Order ID="1111" Amount="200"></Order> <Order ID= "2222" Amount="10"></Order> <Order ID="3333" Amount="5"></Order> <Order ID="1111" Amount="20"></Order> </Orders> The result should be 3 unique count and the 4 Order Id counts. How can i get using XPathNodeIterator using Compile,Execute with a XPathNavigator thanks you bhu The XPath expression for that is count(Orders/Order[not(@ID=preceding-sibling::Or...

Replace Count
I am using this routine to replace characters in a large text string. I would like to know how many replacements have been made. This is a generalized routine for experimenting. If I set lReplCount = 1, I can get a count but it takes over one minute to run. If I set lReplCount = -1, it takes about 20 mSec but I get no count (except 1). Is there any way to get speed and the replace count? I would be happy with a few seconds and an accurate count. Do If InStr(1, sText, vbCr & vbCr) > 0 Then lChangeCount = lChangeCount + 1 ...