Forum Discussion
SoyAllenChiu
Oct 02, 2023Copper Contributor
EXTRACT NUMBER WITH FORMULA
Hi everyone, can someone help me solve this issue? If in a cell there is this term "DISCOUNT 15.00%" how can I extract only the number within text, so I can use it as source amount for calculatio...
- Oct 02, 2023
Hi,
Try
=VALUE(MID(B93,FIND(" ",B93)+1,FIND("%",B93)-(FIND(" ",B93)+1)))
It worked for me. I added "Value" just to get a number instead of a text.
Best regards
Per
SoyAllenChiu
Oct 02, 2023Copper Contributor
Thank you for the response. It worked. Now just a question, how can I do it so it can search where ever the number is listed for example : I wont recommend colleagues to use account number or customers ID during input. But for a curiosity: How it can search for it where ever it is like "HAPPY COOKIES: CUSTOMER ID 11004420 DISCOUNT 15.00%" ?
pfridolf
Oct 02, 2023Copper Contributor
Hi,
In that case I would go for the reply Geir Hogstad suggested, but exchange the " " with "Discount ")
=VALUE(TEXTAFTER(TEXTBEFORE(B93,"%"),"DISCOUNT "))
(Observe the space after DISCOUNT)
Best regards
Per
In that case I would go for the reply Geir Hogstad suggested, but exchange the " " with "Discount ")
=VALUE(TEXTAFTER(TEXTBEFORE(B93,"%"),"DISCOUNT "))
(Observe the space after DISCOUNT)
Best regards
Per
- SoyAllenChiuOct 17, 2023Copper ContributorHello there, thank you all for the help. I found another issue, but i don't know how to explain. It doesn't relate to this article so I will put in a new Article when I know exactly what I want to do and what areas to use the formula in. The formula itself provided by you all, works fine after those advice. Now I have some other issues That kind a make it hard to solve. Thank you.. Also sorry for reporting late, I have been busy lately, But thank you all ❤️