Bringin back values from a csv file

gregpugh

New Member
Joined
Jun 2, 2011
Messages
2
I am wanting to bring back values from a csv file after a certain code. The data in the csv file is in one line and as an example file reads as follows:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
3010,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3015,"bbbb",3020,"c",3025,dddd,3030,"eeeeee",3040,"ffffffff",3050,"g",3060,hhhhhhhhhhhhh,3080,iiiiiiii,3100,jjjjjjjjjj,3125,"kkkkkkkkkkkkkkkka",3135,llllllllll,3136,mmmmmmmmmmm,3138,nnnnnnnnnn,3145,"oooooooooooo",3146,"p",3147,"qqqqqqqqqq qqqq",3148,"rrrrrrrr",ssss,"tttttttttttt",3150,"uuuu",3160,"vvvvvvv",3170,wwwwwwww,3180,xxxxxxxx,3200,yy.yyyy,3210,zz.zzzz,3213,"ab,3214,"acacaca cacac",3215,"adadadada",3216,"aeaeaeaeasea",3217,"agag",afaf,"ahahahahaha",3222,"ajajaja",3229,"akak",3240,a,3241,alalalalala,3242,amamaa,3243,"ananananananan",3244,"aoaoaoao",3245,"x apapap",3246,e,3601,apapap,3605,aqaq,3810,arara,3697,asasas,3698,atata,4001,auaua,4002,avav,4005,awawa,4474,axaxa,4497,ayaya,4101,aza.az,4102,babab.ba,4141,bcbc.bc,4142,bdbd.bd,4149,bebeb.eb,9999.<o:p></o:p>
I would like to bring back the value of the information after code 3160 i.e. vvvvvvv<o:p></o:p>
This may apply to various of the other codes as well.<o:p></o:p>
My files contain up to 16,000 lines of data and 3160 may not always be in the same place, so moving text to columns does not work.<o:p></o:p>
Any ideas? Please help.<o:p></o:p>
Regards<o:p></o:p>
Greg Pugh
:laugh:
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Import the Text string without using text to columns.

Use:

Code:
=MID(A1,FIND("3160",A1,1),LEN(A1)-FIND("3160",A1,1))

To extract the string from 3160 onwards

for everything after 3160

Code:
=MID(A1,FIND("3160",A1,1)+4,LEN(A1)-(FIND("3160",A1,1)-4))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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