String Report

rpadminserver

Board Regular
Joined
Nov 7, 2007
Messages
111
Office Version
  1. 365
Hello all..
I have thousands of records that have descritptions like:
JP-8190 JT-10
This is one cell

In need to pull the 4 numbers after the JP in column b and the 2 or 3 numbers that appear after JT in collumn c.


Thanks all
Rob
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
If the pattern is constant...
Always 4 numbers after JP-
Always the numbers after JT-


Try
=MID(A1,4,4)

and

=MID(A1,FIND("-",A1,4)+1,len(A1))
 
Upvote 0
jonmo1.... thanks
The first one works perfectly,

the 2nd one is almost there.


There is a bunch of other information after the JT- (and 2 or 3 numbers). so the result i'm getting from your formula is everything after the JT-, not just the 2 or 3 numbers. Here is a complete example of the cell:

JP-8190 JT-10 (01) COM A TO K3 - (01)GROUND

IF it helps, there will always be a space between the 2 or 3 numbers after the JT- and the first Left Parentheses
 
Upvote 0
It will always be either 2 or 3 numbers, no more / no less?
Always a space after the 2/3 numbers?

Try

=TRIM(MID(A1,FIND("-",A1,4)+1,3))
 
Upvote 0
FANTASTIC!!!!
Thank you very much!

there is a potental for the number after the jt to be 4 or 5 digits, but that has not happened yet. I'll worry about that when it happens.

Thanks again!

Rob
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,741
Members
452,940
Latest member
rootytrip

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