I am trying to parse this so the numbers before "-" are displayed only. Sometimes it will be a single digit and sometimes double.
I tried =LEFT(B4,FIND("-",B4)-1)
CodePudding user response:
try:
=REGEXEXTRACT(TO_TEXT(B4); "(\d )")*1
for array:
=INDEX(IFERROR(REGEXEXTRACT(TO_TEXT(B4:B); "(\d )")*1))
update:
=INDEX(IFERROR(REGEXEXTRACT(TO_TEXT(C1:C), "^(\d )")*1))