extracting data from a string a characters

jkjensen4144

New Member
Joined
Aug 17, 2018
Messages
1
I am trying to extract some data from a string of characters. In this example "Invoice: 07022018: 28680: 07/02/2018" I want to extract the 28680 that is between the second an third colons. How do I do that?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi & welcome to the board.
Will it always be the between the 2nd & 3rd colons?
 
Upvote 0
In this example "Invoice: 07022018: 28680: 07/02/2018" I want to extract the 28680 that is between the second an third colons. How do I do that?
You use of the words "in this example" makes it sound like you will not always be looking for the value between the second and third colons, hence Fluff's question. However, if you will always want what is between the second and third colons, then you can use this formula...

=TRIM(MID(SUBSTITUTE(A1,":",REPT(" ",100)),200,100))

Note: The formula assume the text in cell A1 will never be longer than 100 characters.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,004
Members
452,374
Latest member
keccles

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