Splitting Text in One Cell to Four New Columns

montyfern

Board Regular
Joined
Oct 12, 2017
Messages
65
Greetings,

So stumped. I've tried power query splitting from columns to rows, dynamic array functions like textsplit, macros, more text splitting; everything under the sun. Their data sits in cell A3. They want to split the data into four columns with Col. A as Authors, Col. B Title, Col. C Journal, and Col. D Year. The problem is all the data sits in one cell & then some of sits in the same column. So adding any special characters like Mr. Excel's | & then splitting whacks it out. Also, in column A they have numbers of author citations, titles, totals and blank rows. It looks like this:

23​
Person A, Person B, Adams M, Person C, Person D, Person M, Person E, Person F, Harrison-Moore S, Lopez ZY. An In Silico Analysis of Blah Blah Pre-Erythrocytic-Stage Antigens Interpreting Worldwide Genetic Data to Suggest Blah Blah. Microorganisms. 2022 May 25;11(1):1090. doi: 10.3390/microorganisms111111. PMID: 111111; PMCID: PMC22222.
2021​
Total: 23
No
Authors, title, journal, year

Thanks so much for any help!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Have to love APA! Easiest way is to use "text to columns" in the data tab. you'll end up with 7 columns instead of just the 4 you're looking for. choose "delimited," and then "other." Put a "." in the box next to other, and it will convert every instance a period occurs into a new column. If you want to separate the date from journal info, you can repeat and just choose semicolon in sept 2. Then just delete the unneeded tabs. If you want to join the DOI back into one, use textjoin(".",,cell1:cell3). Hope that helps!
 

Attachments

  • excel text to columns.PNG
    excel text to columns.PNG
    101.4 KB · Views: 3
Upvote 0
Solution
Greetings,

So stumped. I've tried power query splitting from columns to rows, dynamic array functions like textsplit, macros, more text splitting; everything under the sun. Their data sits in cell A3. They want to split the data into four columns with Col. A as Authors, Col. B Title, Col. C Journal, and Col. D Year. The problem is all the data sits in one cell & then some of sits in the same column. So adding any special characters like Mr. Excel's | & then splitting whacks it out. Also, in column A they have numbers of author citations, titles, totals and blank rows. It looks like this:

23​
Person A, Person B, Adams M, Person C, Person D, Person M, Person E, Person F, Harrison-Moore S, Lopez ZY. An In Silico Analysis of Blah Blah Pre-Erythrocytic-Stage Antigens Interpreting Worldwide Genetic Data to Suggest Blah Blah. Microorganisms. 2022 May 25;11(1):1090. doi: 10.3390/microorganisms111111. PMID: 111111; PMCID: PMC22222.
2021​
Total: 23
No
Authors, title, journal, year

Thanks so much for any help!
Did that work?
 
Upvote 0
Have to love APA! Easiest way is to use "text to columns" in the data tab. you'll end up with 7 columns instead of just the 4 you're looking for. choose "delimited," and then "other." Put a "." in the box next to other, and it will convert every instance a period occurs into a new column. If you want to separate the date from journal info, you can repeat and just choose semicolon in sept 2. Then just delete the unneeded tabs. If you want to join the DOI back into one, use textjoin(".",,cell1:cell3). Hope that helps!
Ahh, that is MUCH better RICH 937. How simple! Made it sooo hard. Thanks for your invaluable input...
 
Upvote 0

Forum statistics

Threads
1,215,274
Messages
6,123,993
Members
449,137
Latest member
abdahsankhan

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