Whoa. 
Not being in Excel for too long, that expression looks crazy. Ok. Uhm...so I guess the substitute() function takes all dashes from the identifier ranges as replaces it with 10 spaces, like you said. So "3-5" becomes "3 5". What do the left() and right() functions do with those substitutions?
Where does H4 come into this? Is that where I put my identifier value?
I broke it down like this:
=SUMPRODUCT( <== this will give me the sum of the products of ranges, which are comma delimited?
(LEFT(SUBSTITUTE(C4:F4,"-",REPT(" ",10)),3)*1<=H4)* <== this takes the first three characters of the identifier ranges after the dashes are replaced by spaces (so the first number of the range)
(RIGHT(SUBSTITUTE(C4:F4,"-",REPT(" ",10)),3)*1>=H4)* <== this takes the last three characters of the identifier ranges after the dashes are replaced by spaces (last number)
(LEFT(SUBSTITUTE(B5:B11,"-",REPT(" ",10)),3)*1<=H5)* <== this takes the first three characters of the age ranges after the dashes are replaced by spaces (so the first number of the age)
(RIGHT(SUBSTITUTE(B5:B11,"-",REPT(" ",10)),3)*1>=H5)* <== this takes the last three characters of the age ranges after the dashes are replaced by spaces (last number)
(C5:F11) <== this is the table range
)
I guess it's taking everything as one array? I'm a little confused.
Bookmarks