Peter Davison
Active Member
- Joined
- Jun 4, 2020
- Messages
- 451
- Office Version
- 365
- Platform
- Windows
I have the following string in Cell AO2
105 - Aylesbury
All I want is to take the first 3 numeric digits (105) and place it is cell AR2
I've tried all of the following 4 formulas
=RIGHT(TEXTJOIN("",TRUE,IFERROR((MID(AO2,ROW(INDIRECT("1:"&LEN(AO2))),1)*1),"")),3)
=LEFT(AO2,SUM(LEN(AO2)-LEN(SUBSTITUTE(AO2,{"0","1","2","3","4","5","6","7","8","9"},""))))
=SUBSTITUTE(TRIM(CONCAT(TEXT(MID(AO2,SEQUENCE(99),1),"0;;0; ")))," ",",")
=left(AO2,3)
and whilst they all extract 105 when my Vlookup uses the result its showing #N/A because I believe it still thinks its text.
When I do an F9 on the formula it shows the result like this - "105"
I've never had this problem before so I don't know what I am doing wrong.
Any thoughts?
Thanks for your time
105 - Aylesbury
All I want is to take the first 3 numeric digits (105) and place it is cell AR2
I've tried all of the following 4 formulas
=RIGHT(TEXTJOIN("",TRUE,IFERROR((MID(AO2,ROW(INDIRECT("1:"&LEN(AO2))),1)*1),"")),3)
=LEFT(AO2,SUM(LEN(AO2)-LEN(SUBSTITUTE(AO2,{"0","1","2","3","4","5","6","7","8","9"},""))))
=SUBSTITUTE(TRIM(CONCAT(TEXT(MID(AO2,SEQUENCE(99),1),"0;;0; ")))," ",",")
=left(AO2,3)
and whilst they all extract 105 when my Vlookup uses the result its showing #N/A because I believe it still thinks its text.
When I do an F9 on the formula it shows the result like this - "105"
I've never had this problem before so I don't know what I am doing wrong.
Any thoughts?
Thanks for your time