Re: Looking for a function that will count the first instance of a
- From: "T. Valko" <biffinpitt@xxxxxxxxxxx>
- Date: Fri, 10 Aug 2007 02:13:26 -0400
What you want to do is count the unique items. Try this:
=SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&""))
--
Biff
Microsoft Excel MVP
"ibvalentine" <ibvalentine@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5D73F497-87EE-4067-BEF5-9BC079EBACDC@xxxxxxxxxxxxxxxx
I have a column in a list that contains types of expenses. I want to count
how many different types of expenses I have. In other words, if one of the
expense types is "office" and there are several instances of "office", I
just
want to count "office" once. If "fees" is in the column several times, I
just
want to count fees once and so on.
The way I do it now is to use the Subtotal feature to group the expenses,
and then click on the level 2 button. The level 2 subtotals will return
just
one instance of each type. I then copy them and use paste special to paste
the values in cells off to the side. I can then use the count function to
count each type of expense.
So I am wondering if there is a better way or if there is a function that
will count just one instance of a group within a field.
.
- Prev by Date: Re: Can Excel do this with coding?
- Next by Date: Re: Help with multiple values for a lookup
- Previous by thread: Re: vlookup - multiple values
- Next by thread: Re: Looking for a function that will count the first instance of a
- Index(es):
Loading