= LET(
sep, FIND("-", ranges),
upper, --RIGHT(ranges,LEN(ranges)-sep),
lower, --LEFT(ranges, sep-1),
distinct, UNIQUE(Name),
COUNTIFS(
Name, distinct,
Score, "<=" & upper,
Score, ">" & lower))
you need to preface with Application.WorksheetFunction(Countifs(....