Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MeatLightning
 
Posts: n/a
Default Count Uniques within a list based on value of cell...

Hi again -
Not sure how to title this one but here goes. I have my iTunes library
in excel (cols: Song Name, Artist, Album, etc). I want to count the number of
albums by any given artist. Note that each record is a Song - meaning I have
a row for each song on an album - the artist and album values stay the same
while the Song Name changes. For ex:

Col A ColB ColC
Song 1 Artist Album
Song 2 Artist Album
Song 3 Artist Album

I'd like to have a cell where I can type in a band name and this band name
will be used in another cells' formula to calculate the number of albums I
own by that artist. I know I can use COUNTIF to determine the number of songs
by that artist. Unfortunately, I can't figure out how to count albums.

Any ideas?

Thanks in advance!
meat

  #2   Report Post  
Posted to microsoft.public.excel.misc
Connie Martin
 
Posts: n/a
Default Count Uniques within a list based on value of cell...

Ever thought of doing a pivot table? It's amazing what data you can collect
with pivot tables.

"MeatLightning" wrote:

Hi again -
Not sure how to title this one but here goes. I have my iTunes library
in excel (cols: Song Name, Artist, Album, etc). I want to count the number of
albums by any given artist. Note that each record is a Song - meaning I have
a row for each song on an album - the artist and album values stay the same
while the Song Name changes. For ex:

Col A ColB ColC
Song 1 Artist Album
Song 2 Artist Album
Song 3 Artist Album

I'd like to have a cell where I can type in a band name and this band name
will be used in another cells' formula to calculate the number of albums I
own by that artist. I know I can use COUNTIF to determine the number of songs
by that artist. Unfortunately, I can't figure out how to count albums.

Any ideas?

Thanks in advance!
meat

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Count Uniques within a list based on value of cell...

Try something like this:

With a list of Song Name, Artist, Album in A1:C20

G1: (enter an artist name here)
H1: =SUMPRODUCT((B1:B20=G1)*(C1:C20<"")/COUNTIF(C1:C20,C1:C20&""))

That formula returns the album count for the artist in G2

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"MeatLightning" wrote:

Hi again -
Not sure how to title this one but here goes. I have my iTunes library
in excel (cols: Song Name, Artist, Album, etc). I want to count the number of
albums by any given artist. Note that each record is a Song - meaning I have
a row for each song on an album - the artist and album values stay the same
while the Song Name changes. For ex:

Col A ColB ColC
Song 1 Artist Album
Song 2 Artist Album
Song 3 Artist Album

I'd like to have a cell where I can type in a band name and this band name
will be used in another cells' formula to calculate the number of albums I
own by that artist. I know I can use COUNTIF to determine the number of songs
by that artist. Unfortunately, I can't figure out how to count albums.

Any ideas?

Thanks in advance!
meat

  #4   Report Post  
Posted to microsoft.public.excel.misc
MeatLightning
 
Posts: n/a
Default Count Uniques within a list based on value of cell...

That's the winner!! Thanks a bunch. I need to learn me some about that
SUMPRODUCT stuff.

"Ron Coderre" wrote:

Try something like this:

With a list of Song Name, Artist, Album in A1:C20

G1: (enter an artist name here)
H1: =SUMPRODUCT((B1:B20=G1)*(C1:C20<"")/COUNTIF(C1:C20,C1:C20&""))

That formula returns the album count for the artist in G2

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"MeatLightning" wrote:

Hi again -
Not sure how to title this one but here goes. I have my iTunes library
in excel (cols: Song Name, Artist, Album, etc). I want to count the number of
albums by any given artist. Note that each record is a Song - meaning I have
a row for each song on an album - the artist and album values stay the same
while the Song Name changes. For ex:

Col A ColB ColC
Song 1 Artist Album
Song 2 Artist Album
Song 3 Artist Album

I'd like to have a cell where I can type in a band name and this band name
will be used in another cells' formula to calculate the number of albums I
own by that artist. I know I can use COUNTIF to determine the number of songs
by that artist. Unfortunately, I can't figure out how to count albums.

Any ideas?

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
How do I set a cell value based on a formula in another cell? dingy101 Excel Discussion (Misc queries) 1 November 21st 05 08:51 AM
count cell if value present in every other cell + criteria lrbest4x4xfar Excel Worksheet Functions 2 September 26th 05 01:30 AM
how to set up one cell that assigns a value based on the value of another cell Joseph Excel Worksheet Functions 2 June 22nd 05 06:38 AM
Can I format a cell in excel based on a list of about 20 items? arkansooner Excel Discussion (Misc queries) 1 June 17th 05 02:38 PM
"count if" function based on value of another cell Anauna Excel Worksheet Functions 3 February 24th 05 06:33 PM


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