Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MeatLightning
 
Posts: n/a
Default count unique items in ever-growing list?

Hey all -
I'm trying to count the number of albums I have digitized. I have a
series of columns with album info as exported from iTunes. One of the columns
lists Album Name but the album name is repeated for each record (in this case
each Song). I just want to know how many albums I have in the list.

I tried using the formula suggested in another similar post
[=SUMPRODUCT((Data!D2:D1413<"")/COUNTIF(Data!D2:D1413,Data!D2:D1413&""))]
but this requires me to continually update the max range value (i.e.
"D14138") as I import more records. Is there a formula that does the same
thing but can handle empty cells? (so I can put in something like "D9999" for
the max range value)

thanks in advance!!!
meat
  #2   Report Post  
Posted to microsoft.public.excel.misc
Barb Reinhardt
 
Posts: n/a
Default count unique items in ever-growing list?

I'd do this with offset and a named range. I've only done this a couple of
times so it might not work quite right the first time.

Insert a named range with this in it:

=OFFSET(Sheet1!D2,0,0,COUNT(Sheet1!$D:$D),1)

You may need to subtract something from the COUNT piece to get it to work
properly.

Once you define the named range, I'd check it with CTRL G and enter your
range name to see if it selects the range you want.

Then enter your named range in your formulas

=SUMPRODUCT((Range<"")/COUNTIF(Range,Range&""))]

"MeatLightning" wrote:

Hey all -
I'm trying to count the number of albums I have digitized. I have a
series of columns with album info as exported from iTunes. One of the columns
lists Album Name but the album name is repeated for each record (in this case
each Song). I just want to know how many albums I have in the list.

I tried using the formula suggested in another similar post
[=SUMPRODUCT((Data!D2:D1413<"")/COUNTIF(Data!D2:D1413,Data!D2:D1413&""))]
but this requires me to continually update the max range value (i.e.
"D14138") as I import more records. Is there a formula that does the same
thing but can handle empty cells? (so I can put in something like "D9999" for
the max range value)

thanks in advance!!!
meat

  #3   Report Post  
Posted to microsoft.public.excel.misc
MeatLightning
 
Posts: n/a
Default count unique items in ever-growing list?

bingo! works great! Thanks so much!

The only slight hang-up is that the named range stops at the first blank (so
I just need to make sure every song in my collection has an "Album" value in
it's metadata - not a big deal really).

For those playing along at home, here are my formulas:

Sheet info:
- Album column (the target) is "D" on sheet "Data"
- Album count appears on sheet "Summary"

Named range formula:
- =OFFSET(Data!$D$1,0,0,COUNTA(Data!$D:$D),1)
- Named range is called "Album"

Album count formula:
- =(SUMPRODUCT((Album<"")/COUNTIF(Album,Album&"")))-1
- the "-1" at the end accounts for the column header label

thanks again!
meat

"Barb Reinhardt" wrote:

I'd do this with offset and a named range. I've only done this a couple of
times so it might not work quite right the first time.

Insert a named range with this in it:

=OFFSET(Sheet1!D2,0,0,COUNT(Sheet1!$D:$D),1)

You may need to subtract something from the COUNT piece to get it to work
properly.

Once you define the named range, I'd check it with CTRL G and enter your
range name to see if it selects the range you want.

Then enter your named range in your formulas

=SUMPRODUCT((Range<"")/COUNTIF(Range,Range&""))]

"MeatLightning" wrote:

Hey all -
I'm trying to count the number of albums I have digitized. I have a
series of columns with album info as exported from iTunes. One of the columns
lists Album Name but the album name is repeated for each record (in this case
each Song). I just want to know how many albums I have in the list.

I tried using the formula suggested in another similar post
[=SUMPRODUCT((Data!D2:D1413<"")/COUNTIF(Data!D2:D1413,Data!D2:D1413&""))]
but this requires me to continually update the max range value (i.e.
"D14138") as I import more records. Is there a formula that does the same
thing but can handle empty cells? (so I can put in something like "D9999" for
the max range value)

thanks in advance!!!
meat

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
Best way to get a list of unique entries in a field [email protected] Excel Worksheet Functions 2 January 19th 06 10:30 PM
Count unique values among duplicates in a subtotal range jcpotwor Excel Discussion (Misc queries) 2 January 12th 06 01:29 PM
How do I delete items in one list from another list? Danielle Excel Discussion (Misc queries) 4 December 13th 05 02:32 AM
count unique with conditions \ditzman via OfficeKB.com\ Excel Worksheet Functions 8 July 8th 05 12:41 PM
How do I find out what items are in one list but not in another l. Michelle Craig Excel Discussion (Misc queries) 2 December 22nd 04 08:32 PM


All times are GMT +1. The time now is 01:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"