• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

CSV file with non-blank empty cells

ashillz

New Member
Hi All:

I have exported to .csv some data from a database that I am trying to gain some basic insights into (% of fields populated, for example). It appears that every cell with no value is formatted in a strange way that it does not register as a blank cell when using formulas like COUNTA(). I was curious if anyone had a suggestion on how to systematically correct these 'blank' cells. My current approach of filtering each column for blanks, selecting those blank cells and hitting 'Clear' is not feasible on a file with many columns.

Please see the attached sample file that demonstrates the problem here. Thanks for the help!

ashillz
 

Attachments

  • CSV SAMPLE.xlsx
    11.6 KB · Views: 6
Welcome to the forum.

Use COUNTIF() instead of COUNTA().

Ex: In K8
=COUNTIF(OFFSET($B$4,1,ROWS(J$5:J8)-1,26,1),"?*")

? is any text (not numbers), * as wild card.

So counting only cells with at least one character.
 
The approach mentioned by Chihiro seems to work on all fields in the sample file, with the exception of 'Id'. Is there a slight modification to this approach that will support number, text, and date values?
 
Hi, to both!

You could try:
[K5] : =SUM(COUNTIF(INDEX(B$5:F$30,,ROWS(K$5:K5)),{"?*";">0"}))

And drag it down. Blessings!
 
Though I'd recommend John's method. Another method is to add COUNTIF(Range,">0") to the formula.
Ex:
=COUNTIF(OFFSET($B$4,1,ROWS(J$5:J8)-1,26,1),"?*")+COUNTIF(OFFSET($B$4,1,ROWS(J$5:J8)-1,26,1),">0")
 
Back
Top