Counting Unique Entries Wit a Twist

M

Minitman

Greetings,

I have a list of about 2 k entries that I need to get a count of
unique numbers in column D. The twist, there are a few entries that
are blank. I need to count each blank entry as a unique entry and add
that number to the rest of the unique entries for column D.

I read the article at http://www.cpearson.com/excel/duplicat.htm, but
it did not address counting each blank as a unique entry only NOT
counting the blanks or counting all of the blanks as duplicates of
themselves.

Is there anyway to count each blank as a separate entry along with all
of the other non duplicating entries?

Any help would be most appreciated.

CIA

-Minitman
 
J

JulieD

Hi

you can use the countblank function
=COUNTBLANK(A1:A10)
to count the number of blanks and then add that result to the count of
unique entries

Cheers
JulieD
 
M

Minitman

Hey Julie,

I just realized, since I do not know where the last row is going to be
(it keeps changing), this solution will give me a count of all of the
rows that are below the last row (A:A) as well as the legitimate blank
rows.

How do I get the last row if there are blank rows also among the data
rows?

Any help is most appreciated.

-Minitman
 
A

Aladin Akyurek

Let A2 be the start of data.

B2:

=MAX(CELL("Row",A2),MATCH(9.99999999999999E+307,A:A))

B3:

=SUM(IF(A2:INDEX(A:A,B2)<>"",1/COUNTIF(A2:INDEX(A:A,B2),A2:INDEX(A:A,B2))))+COUNTBLANK(A2:INDEX(A:A,B2))

which you need to confirm with control+shift+enter instead of just wit
enter.
Hey Julie,

I just realized, since I do not know where the last row is going to be
(it keeps changing), this solution will give me a count of all of the
rows that are below the last row (A:A) as well as the legitimate blank
rows.

How do I get the last row if there are blank rows also among the data
rows?

[...
 
M

Minitman

Thanks Aladin,

That is just what I was looking for.

-Minitman


Let A2 be the start of data.

B2:

=MAX(CELL("Row",A2),MATCH(9.99999999999999E+307,A:A))

B3:

=SUM(IF(A2:INDEX(A:A,B2)<>"",1/COUNTIF(A2:INDEX(A:A,B2),A2:INDEX(A:A,B2))))+COUNTBLANK(A2:INDEX(A:A,B2))

which you need to confirm with control+shift+enter instead of just with
enter.
Hey Julie,

I just realized, since I do not know where the last row is going to be
(it keeps changing), this solution will give me a count of all of the
rows that are below the last row (A:A) as well as the legitimate blank
rows.

How do I get the last row if there are blank rows also among the data
rows?

[...]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top