Extract

thanksamillion101

New Member
Joined
Jul 8, 2020
Messages
41
Office Version
  1. 2010
Hello and thanks in advance! I have tried several formulas and cannot get what I am needing.

I am needing help with extracting all information to the left of last decimal and two dashes before that decimal.
Ex:
(I need all information before) -010119-12345.pdf

I thought to use number of characters left of the last decimal, but there is not a consistency with the exact number of characters)

again, Thank you for your help!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Can you please post 10 examples of your strings, along with the results you want?
You can use the XL2BB add-in to post the sample data to the board.
 
Upvote 0
I do apologize for question and detail being so vague.

DATA Result
ON-NN-CAS-DIM-DIM-02-03152019-123456.pdf ON-NN-CAS-DIM-DIM-02
ON-NN-CAS-DIM-DIM-03152019-7891011.pdf ON-NN-CAS-DIM-DIM
ON-NN-CAS-DIM-DIM-01-03152019-123456.pdf ON-NN-CAS-DIM-DIM-01
ON-NN-CAS-DIM-DIM-03-03152019-1234.pdf ON-NN-CAS-DIM-DIM-03
ON-NN-CAS-DIM-DIM-04-03152019-1234567.pdf ON-NN-CAS-DIM-DIM-04
OFF-NN-CAS-DIM-DIM-02-03152019-123.pdf OFF-NN-CAS-DIM-DIM-02
OFF-NN-CAS-DIM-DIM-02-03152019-1234.pdf OFF-NN-CAS-DIM-DIM-02
ON-NN-CAS-DIM-DIM-06-03152019-12345.pdf ON-NN-CAS-DIM-DIM-06
ON-NN-CAS-DIM-DIM-02-031519-123456.pdf ON-NN-CAS-DIM-DIM-02
ON-NN-CAS-DIM-DIM-04-031519-12345678.pdf ON-NN-CAS-DIM-DIM-04
 
Upvote 0
DATAResult
ON-NN-CAS-DIM-DIM-02-03152019-123456.pdfON-NN-CAS-DIM-DIM-02
ON-NN-CAS-DIM-DIM-03152019-7891011.pdfON-NN-CAS-DIM-DIM
ON-NN-CAS-DIM-DIM-01-03152019-123456.pdfON-NN-CAS-DIM-DIM-01
ON-NN-CAS-DIM-DIM-03-03152019-1234.pdfON-NN-CAS-DIM-DIM-03
ON-NN-CAS-DIM-DIM-04-03152019-1234567.pdfON-NN-CAS-DIM-DIM-04
OFF-NN-CAS-DIM-DIM-02-03152019-123.pdfOFF-NN-CAS-DIM-DIM-02
OFF-NN-CAS-DIM-DIM-02-03152019-1234.pdfOFF-NN-CAS-DIM-DIM-02
ON-NN-CAS-DIM-DIM-06-03152019-12345.pdfON-NN-CAS-DIM-DIM-06
ON-NN-CAS-DIM-DIM-02-031519-123456.pdfON-NN-CAS-DIM-DIM-02
ON-NN-CAS-DIM-DIM-04-031519-12345678.pdfON-NN-CAS-DIM-DIM-04
 
Upvote 0
Ok, thanks for that.
How about
+Fluff New.xlsm
AB
1
2ON-NN-CAS-DIM-DIM-02-03152019-123456.pdfON-NN-CAS-DIM-DIM-02
3ON-NN-CAS-DIM-DIM-03152019-7891011.pdfON-NN-CAS-DIM-DIM
4ON-NN-CAS-DIM-DIM-01-03152019-123456.pdfON-NN-CAS-DIM-DIM-01
5ON-NN-CAS-DIM-DIM-03-03152019-1234.pdfON-NN-CAS-DIM-DIM-03
6ON-NN-CAS-DIM-DIM-04-03152019-1234567.pdfON-NN-CAS-DIM-DIM-04
7OFF-NN-CAS-DIM-DIM-02-03152019-123.pdfOFF-NN-CAS-DIM-DIM-02
8OFF-NN-CAS-DIM-DIM-02-03152019-1234.pdfOFF-NN-CAS-DIM-DIM-02
9ON-NN-CAS-DIM-DIM-06-03152019-12345.pdfON-NN-CAS-DIM-DIM-06
10ON-NN-CAS-DIM-DIM-02-031519-123456.pdfON-NN-CAS-DIM-DIM-02
11ON-NN-CAS-DIM-DIM-04-031519-12345678.pdfON-NN-CAS-DIM-DIM-04
Main
Cell Formulas
RangeFormula
B2:B11B2=TRIM(LEFT(SUBSTITUTE(A2,"-",REPT(" ",100),LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))-1),100))


It's best to use the XL2BB add-in when posting data to the board.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

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