Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Counting blank cells between non-blank cells

Does anyone know a simple way to count the number of blank cells between
non-blank cells? I have a column of data that in some cases has from zero to
five blank cells between non-blank ones. If there are not two blank cells
between the non-blank ones, it is an indication of a potential coding error
within the data source. I'm looking for an easy way to do my data scrub.

Any ideas would be helpful.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Counting blank cells between non-blank cells

=COUNTBLANK(A1:A10)




"AndyH" wrote:

Does anyone know a simple way to count the number of blank cells between
non-blank cells? I have a column of data that in some cases has from zero to
five blank cells between non-blank ones. If there are not two blank cells
between the non-blank ones, it is an indication of a potential coding error
within the data source. I'm looking for an easy way to do my data scrub.

Any ideas would be helpful.

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Counting blank cells between non-blank cells

=COUNTBLANK(A5:A11)
or
=1-ROW(A5)+ROW(A11)-COUNTA(A5:A11)

de3pending upon whether you want to count blanks or empties
--
Gary''s Student - gsnu200814


"AndyH" wrote:

Does anyone know a simple way to count the number of blank cells between
non-blank cells? I have a column of data that in some cases has from zero to
five blank cells between non-blank ones. If there are not two blank cells
between the non-blank ones, it is an indication of a potential coding error
within the data source. I'm looking for an easy way to do my data scrub.

Any ideas would be helpful.

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Counting blank cells between non-blank cells

Andy,

Try

=IF(SUMPRODUCT((A2:A101="")*(A3:A102<"")*(A1:A100 <""))0,"Coding error","All OK")

Note the slight offsets of the ranges...

HTH,
Bernie
MS Excel MVP


"AndyH" wrote in message
...
Does anyone know a simple way to count the number of blank cells between
non-blank cells? I have a column of data that in some cases has from zero to
five blank cells between non-blank ones. If there are not two blank cells
between the non-blank ones, it is an indication of a potential coding error
within the data source. I'm looking for an easy way to do my data scrub.

Any ideas would be helpful.

Thanks.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Counting blank cells between non-blank cells

Hi,

If you just want to be alerted to the fact that two consecutive cells are
blank why not try conditional formatting:

1. Select all the data in a column, suppose its A2:A1000, and choose Format,
Condtional Formatting, from the first drop down pick Formula is and in the
second box enter the formula

=OR(AND(A2="",A1=""),AND(A2="",A3=""))

Click the Format button and choose a color on the patterns tab

If this helps, please click the Yes button

Cheers,
Shane Devenshire
"AndyH" wrote:

Does anyone know a simple way to count the number of blank cells between
non-blank cells? I have a column of data that in some cases has from zero to
five blank cells between non-blank ones. If there are not two blank cells
between the non-blank ones, it is an indication of a potential coding error
within the data source. I'm looking for an easy way to do my data scrub.

Any ideas would be helpful.

Thanks.

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 Non Blank Cells AJ[_2_] New Users to Excel 6 March 27th 08 11:06 PM
Counting non-blank cells Joe M. Excel Discussion (Misc queries) 7 July 23rd 07 09:36 PM
Counting Non Blank Cells that Contain Formulas jimswinder Excel Worksheet Functions 1 July 21st 06 11:36 PM
Counting blank cells geoff1234 Excel Discussion (Misc queries) 7 July 10th 06 11:29 AM
counting blank cells bdq17 Excel Discussion (Misc queries) 6 December 7th 05 08:46 PM


All times are GMT +1. The time now is 10:22 AM.

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"