79535930

Date: 2025-03-26 09:32:18
Score: 0.5
Natty:
Report link

Adding my own alternative solution as well after doing more research while the question was posted. I believe in my case, my count isn't looking at results per row which is ok in this instance as cell range values don't overlap, but would not be accurate if they did.

=countif(arrayformula(if(REGEXMATCH(to_text(SPLIT(B2:B,",")),"-"),if(A2>=value(REGEXEXTRACT(to_text(SPLIT(B2:B,",")),"(.*)-.*")),if(A21<=value(REGEXEXTRACT(to_text(SPLIT(B2:B,",")),".*-(.*)")),true,),false),if(value(SPLIT(B2:B,","))=A2,True,False))), TRUE)
Value To Lookup Range Result of Formula
7 5,6-9,17 2
3,5,7-10,16-20
5,8-9,11-15
9,10-13,19
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: James Dong