Forum Discussion
Steve-TESTRITE
Nov 18, 2024Copper Contributor
formula to extract number value before a specific criteria
Hello,
I'm trying to extract first batch of numbers from the string below so it'll be 300, can anyone help?
A formula to call out number value before text value "Wh"
Jackery 300w portable power station 24 hour run time.
thanks
5 Replies
- LorenzoSilver Contributor
=VALUE( TAKE( TEXTSPLIT( TEXTBEFORE( A1, "Wh " ), " " ),, -1 ) )
- Harun24HRBronze Contributor
Nice solution. Shorter and simpler.
- LorenzoSilver Contributor
One way or another that doesn't seem to matter Steve-TESTRITE
- Harun24HRBronze Contributor
Try the following formula-
=@LET(x,--TEXTSPLIT(SUBSTITUTE(A1,"w ", " "),," "),FILTER(x,ISNUMBER(x)))
- peiyezhuBronze Contributor
A formula to call out number value before text value "Wh"
Jackery 300w"Wh" or "w"
if "w",try REGEXEXTRACT Function
https://support.microsoft.com/en-us/office/regexextract-function-4b96c140-9205-4b6e-9fbe-6aa9e783ff57