Forum Discussion
anthonyc89
Aug 26, 2022Copper Contributor
Extract Number If Text
I have data in the first column and I want a formula that will return the number before "min" in the 2nd column and the number before "secs" in the 3rd column. MIN SEC 35 secs #N/A 35...
- Aug 26, 2022
=IFERROR(IF(SEARCH("secs",A2),VALUE(MID(A2,IFERROR(SEARCH("min ",A2)+4,1),2))),NA())
anthonyc89
Aug 26, 2022Copper Contributor
Thank you dscheikey . This worked!
mtarler
Aug 26, 2022Silver Contributor
anthonyc89 alternatively:
min:
=IFERROR(--LEFT(A2,SEARCH("min",A2)-1),"")sec:
=IFERROR(--MID(LEFT(A2,SEARCH("sec",A2)-1),IFERROR(SEARCH("min",A2)+4,1),99),"")