Hi,
I am trying to figure out an excel 365 formula that can check if a number is in a list of numbers.
"list" is an excel column that contains both single values and intervals (e.g "80:81,441:443,500").
I was trying to use FILTERXML("<x><y>"&SUBSTITUTE(TEXTJOIN(" ",TRUE,D2),",","</y><y>")&"</y></x>","//y") to make a list into an array and then use ROW(INDIRECT(a:b)) to explode the a:b range
so far I came up with this one :
=SUM(--(IF(ISNUMBER(FIND(":",FILTERXML("<x><y>"&SUBSTITUTE(D2,",","</y><y>")&"</y></x>","//y"))),ROW(INDIRECT(FILTERXML("<x><y>"&SUBSTITUTE(D2,",","</y><y>")&"</y></x>","//y"))),NUMBERVALUE(FILTERXML("<x><y>"&SUBSTITUTE(D2,",","</y><y>")&"</y></x>","//y")))=H2))
but for some reason it can only see the first value in a range by using this formula.
any ideas are much apreciated
Thank you
I am trying to figure out an excel 365 formula that can check if a number is in a list of numbers.
"list" is an excel column that contains both single values and intervals (e.g "80:81,441:443,500").
I was trying to use FILTERXML("<x><y>"&SUBSTITUTE(TEXTJOIN(" ",TRUE,D2),",","</y><y>")&"</y></x>","//y") to make a list into an array and then use ROW(INDIRECT(a:b)) to explode the a:b range
so far I came up with this one :
=SUM(--(IF(ISNUMBER(FIND(":",FILTERXML("<x><y>"&SUBSTITUTE(D2,",","</y><y>")&"</y></x>","//y"))),ROW(INDIRECT(FILTERXML("<x><y>"&SUBSTITUTE(D2,",","</y><y>")&"</y></x>","//y"))),NUMBERVALUE(FILTERXML("<x><y>"&SUBSTITUTE(D2,",","</y><y>")&"</y></x>","//y")))=H2))
but for some reason it can only see the first value in a range by using this formula.
any ideas are much apreciated
Thank you