Extract Data Before Non-Numeric Character

BeeLev

New Member
Joined
Jan 28, 2019
Messages
3
I'd like to extract the numeric values after "PW" but before any non-numeric values. I've tried EXTRACTNUMBERS(MID(F2,find("PW",F2)+2,6), but I'm picking up extraneous numbers.

Example:

Tested PW31
Call re: PW6798
Reviewed info PW64167/2
Updated PW 1,2,41

Desired Output:
31
678
64167
1

Thanks!
 
Thanks for the quick responses!! The original solution worked great, except for some of my data has "PW" referenced multiple times and the output is a small deciml number.. Can the formula to be adjusted to only pick up the first "PW" reference?

Example: Created PW 3, Edited PW 3, Reviewed PW 3

Desired Output: 3

The formula in post #2 does pick up the first reference. For the above example it returns 3, as desired.

Not sure what you mean by "small deciml number"?

Regards
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
@OP, so does my formula, don't understand the problem:


Book1
AB
1Tested PW3131
2Call re: PW67986798
3Reviewed info PW64167/264167
4Updated PW 1,2,411
5Created PW 3, Edited PW 3, Reviewed PW 33
6Created PW 3, Edited PW 4, Reviewed PW 53
Sheet508
Cell Formulas
RangeFormula
B1=-LOOKUP(1,-MID(A1,SEARCH("PW",A1)+2,ROW($1:$99)))
 
Upvote 0
Updated PW12 Jun

the formula

=-LOOKUP(1,-(MID(A1,FIND("PW",A1)+2,{1,2,3,4,5,6,7,8,9,10})&"**0"))

correctly returns 12, though

=-LOOKUP(1,-(MID(A1,FIND("PW",A1)+2,{1,2,3,4,5,6,7,8,9,10})&"E0"))

incorrectly returns 36689, since the resulting substring "12 – JunE0", by pure misfortune (“Jun” & “E” is still “June”!), happens to represent, when coerced to a numeric, the date 12/06/2000.
What if you use "E+0" instead of "E0"?
 
Upvote 0
Hi All,

This is exactly the sort of solution I need for my current problem.

Question how could you amend the formula to not find PW, but I know when the first numeric value starts? For example I know it starts at say character 18 (this can vary) and I just want to extract the numeric values up until the next non numeric?

Hope you can help.

Thanks
 
Upvote 0
You'd be better off starting your own thread rather than resurrecting a 5 year old one. ;)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top