Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Counting NON-Blank fields

I have two columns of data that I export from MS-Access into Excel and then
paste into another excel spreadsheet.

Column A is my description; Columns B and C are my values.

Both Column B and Column C have 50 rows. (This number varies)
Column B has some blank rows.
Column C has data in all rows (always).

I need to count the number of records in each column.

Using the CountA command, I currently first have to select any blank field
and delete the contents as Excel is reacting as if they are not blank.

Using the CountBlank command it correctly counts the blank fields, however,
I need to count the Non-Blank fields.

=COUNTA(B1:B50) would give me what I need if it would ignore the empty
fields.
=COUNTA(C1:C50) works fine.

(I've tried subtracting the blank count from the total in Column C but my
total fields are not directly following the populated fields so to easy to
have an extra blank row in the range.)

Perhaps this is an Access question? How do I make empty fields blank?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting NON-Blank fields

Try checking one of those "blank" cells to see what's in it.

Let's assume B1 is one of those cells.

Try these formulas:

=LEN(B1)

=CODE(B1)

What results do you get wth those formulas?

--
Biff
Microsoft Excel MVP


"Phyllsf" wrote in message
...
I have two columns of data that I export from MS-Access into Excel and then
paste into another excel spreadsheet.

Column A is my description; Columns B and C are my values.

Both Column B and Column C have 50 rows. (This number varies)
Column B has some blank rows.
Column C has data in all rows (always).

I need to count the number of records in each column.

Using the CountA command, I currently first have to select any blank field
and delete the contents as Excel is reacting as if they are not blank.

Using the CountBlank command it correctly counts the blank fields,
however,
I need to count the Non-Blank fields.

=COUNTA(B1:B50) would give me what I need if it would ignore the empty
fields.
=COUNTA(C1:C50) works fine.

(I've tried subtracting the blank count from the total in Column C but my
total fields are not directly following the populated fields so to easy to
have an extra blank row in the range.)

Perhaps this is an Access question? How do I make empty fields blank?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 342
Default Counting NON-Blank fields

It will depend on the format of the field in Access. If it is formated
"number" then no value fields will export os "0". but if it is formated as
text then no value fields will export as blank.

Once in excel, the first scenario could be managed with:

=COUNTA(B2:B10)-COUNTIF(B2:B10,0)

The second scenario could be managed with:

=COUNTA(C2:C10)

The best solution could be to add a field in Access that meets your needs in
Excel.


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 from multiple fields toby131 Excel Discussion (Misc queries) 7 October 8th 09 03:56 PM
counting coloured fields Redsphynx Excel Discussion (Misc queries) 6 March 12th 08 08:42 AM
Counting fields on criteria in other fields [email protected] Excel Worksheet Functions 1 October 31st 07 12:22 AM
Help Counting Conditional Text Fields Rodman Excel Discussion (Misc queries) 2 January 25th 07 09:40 PM
Counting a range of fields with an "X" Arge Excel Worksheet Functions 7 December 7th 04 03:23 AM


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