Mid find search

termsig

New Member
Joined
Mar 3, 2015
Messages
5
Hello,

I'm trying split the cell into multiple data sets however i have some difficulties to get some of them pulling correctly.

[TABLE="width: 483"]
<tbody>[TR]
[TD="width: 483"]Data sets is looking like below and it's divided from each information by "|" and each data set might have different number of characters. INFO1|INFO2|INFO3|INFO4|INFO5 [/TD]
[/TR]
</tbody>[/TABLE]

I did manage to get the 1,2,3 split out from string however i have difficulties for 4 and 5.

INFO2
=MID(A1, SEARCH("|",A5) + 1, SEARCH("|",A5,SEARCH("|",A5)+1) - SEARCH("|",A5) - 1)
INFO3
=MID(A5, FIND("|",A5, SEARCH("|",A5)+1)+1, SEARCH("|",A5,SEARCH("|",A5)-1) )

Anyone can help how i can get 4 and 5 sorted as for some reason nothing is working correctly.

Thanks T.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You can do that with Text to Columns.
On page 2 select Other & enter | in the box
 
Upvote 0
You can do that with Text to Columns.
On page 2 select Other & enter | in the box

i know that it's possible and it's probably the easiest way to do it however i'm trying remove the additional process where people who will use spreadsheet would need to this every time therefore the way with the function instead.
 
Upvote 0
Generic solution is here:

https://exceljet.net/formula/split-text-with-delimiter

Example:


Book1
ABCDEF
1FirstSecondThirdFourthFifth
2INFO1|INFO2|INFO3|INFO4|INFO5INFO1INFO2INFO3INFO4INFO5
3WIDE|BOY|DIXON|RULESMYWORLDWIDEBOYDIXONRULESMYWORLD
41|2|3333333|44|5123333333445
Sheet1
Cell Formulas
RangeFormula
B2=TRIM(MID(SUBSTITUTE($A2,"|",REPT(" ",LEN($A2))),1,LEN($A2)))
C2=TRIM(MID(SUBSTITUTE($A2,"|",REPT(" ",LEN($A2))),LEN($A2)+1,LEN($A2)))
D2=TRIM(MID(SUBSTITUTE($A2,"|",REPT(" ",LEN($A2))),2*LEN($A2)+1,LEN($A2)))
E2=TRIM(MID(SUBSTITUTE($A2,"|",REPT(" ",LEN($A2))),3*LEN($A2)+1,LEN($A2)))
F2=TRIM(MID(SUBSTITUTE($A2,"|",REPT(" ",LEN($A2))),4*LEN($A2)+1,LEN($A2)))


WBD
 
Upvote 0
Hi,


Book1
ABCDEFG
1INFO1|INFO2|INFO3|INFO4|INFO5INFO1INFO2INFO3INFO4INFO5
2INFO1|someOTHERinfo|YetMoreINFO3|evenMore 4|Hopefully last one-INFO5|Nope, this is Last INFOINFO1someOTHERinfoYetMoreINFO3evenMore 4Hopefully last one-INFO5Nope, this is Last INFO
Sheet177
Cell Formulas
RangeFormula
B1=TRIM(MID(SUBSTITUTE($A1,"|",REPT(" ",300)),COLUMNS($B1:B1)*300-299,300))


B1 formula copied down and across as far as needed.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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