2

I have a cell contains this value/text :

T50 EX3 OF2 BE40 BL10 ZLD6 ZLS2 ZRS10 AA1

How to get the number with the 'EX' prefix ? in this case i want to extract that '3' from EX3.

Also, this number can be any digit, for example it can be :

EX112

or

EX00078 

How to extract that '112' and '00078' and make it as number 112 and 78 ?

Thanks

New contributor
andio is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

Try regexextract() like this:

=iferror( value( regexextract(A2, "\bEX(\d+)") ) )

The value() wrapper converts to number, and iferror() guards against cells that do not contain an "EX" sequence.

To learn the exact regular expression syntax used by Google Sheets, see RE2.

Your Answer

andio is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.