How to sum durations of multiple set lists within one song list

Hi all.


I'm trying to use Numbers for organizing a list of songs (with titles in one column, durations in another, and additional song data in other columns) into “setlists” (musicians' term, not computer programmers' term), such as Set 1, Set 2, Xmas Set, Valentine’s Day Set, etc. A screenshot is below.


Here’s my goal: I’d like to see a live-updating duration of each setlist as I add or subtract songs to various sets. (**Importantly, some songs are in multiple setlists.**) Got me so far? I'm trying to figure out the best way to do this. It seems like it should be a fairly simple thing to do. I just can’t figure out how to set things up so that it’ll work.


Currently, each song's title is in column “A” and its duration is in column "I" as a number, such as 2.5. I currently have a column for each set (Column B is Set 2, Column C is Set 3, etc.) with a number in the appropriate column, that will show the order of songs within the set. If a song is in Set 1, within the Set 1 column (“B”), there's a number between 100 and 199; if a song is in Set 2, there's a number between 200 and 299 within the Set 2 column (“C”) that shows where it falls in the set, etc.


I tried making a formula in each setlist’s column header that says, more or less, “If there’s anything in this setlist’s column (B, C, etc.), include the duration in the SUM in Column “I”… otherwise, 0. But it adds ALL songs durations, not just those in the given setlist. IF(NOT(ISBLANK(B4:B235)),SUM(I4:I235),0) 


Should I be using Categories, Sort, and/or Filter instead… or in addition? I’m less familiar with these. (I’m more of a Filemaker Pro guy, but it seems like overkill for this task, and I would like to use Numbers if possible.) Or some other approach, such as multiple “Sheets”? I’d prefer not to use multiple sheets so that I don’t get taken to a different sheet when I search for a song title.


Thanks for any input. Much appreciated.


Edly


MacBook Air 13″, macOS 11.5

Posted on Aug 24, 2021 8:27 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 24, 2021 9:37 AM

Take a look at SUMIF. Your description of what you want says it all "If there’s anything in this setlist’s column include the duration in the SUM". I.e., "sum if..."


set 1 would be =SUMIF(B,"<>",I)


6 replies

Aug 26, 2021 5:50 AM in response to edly

Barry gave you great advice on using headers and using the column letter by itself to reference the entire column.


Your table appears to be filtered or has hidden rows. If you did not unfilter/unhide all those rows before copy/pasting or drag/filling your formula down the column, those rows did not get the formula.


edited: I deleted all that followed because it ignored the fact that a song might be in more than one set. Duh.


You asked about categories. For categories to work, you need a column to categorize by. I had suggested making a column for "set" in which you would put 1, 2, 3, or 4 so you can categorize by it, list the songs, and get a quick subtotal of the duration of each set but it ignored the fact that a song might be in more than one set. You would have to have the same song listed in your table more than once if it was in more than one set. Unless you want to do that, I don't think categories is a good option.

Aug 25, 2021 11:00 PM in response to edly

I suspect that if you examine the formula you may find that the range has changed to match the current position of the sorted values that were in B5 and B259 (and I5 and I259.


Setting rows 1 to 4 as Header Rows, then changing the SUMIF ranges to a letter only value to indicate the whole column, excluding the header rows.


SUMIF(B<>I)


Regards,

Barry

Aug 25, 2021 6:26 PM in response to Badunit

Hey, thanks for your reply. SUMIF sounds like just the ticket. I think I put it in right:

SUMIF(B5:B259,"<>",I5:I259)

Right?

It seems to be working, but when I sort by different columns, the total duration value for the set changes, which doesn't seem right. I'll look some more soon, but if anything jumps out at you, I'd appreciate your input.


In the meantime, thanks again! Great answer!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to sum durations of multiple set lists within one song list

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.