简体   繁体   中英

How to get every word in multiple sentences into text cells in Excel?

My final objective is to make a word cloud to see which word should get more attention and be more catchy look to the eye. (Word could be replace by problem if I could share real data). How can I get every single word from my cells full of sentences (even multiple sentences)?

I have searched the internet for my answer; I know how to get to my final objective. But the first appropriate step is missing for my problem. Every link I have found, even non related to my final objective, always have single cell with one word. Or if there is a sentence in a cell, they don't manage a lot of data.

A lot of data for me is a thousand cell text with multiple sentences.

Simple example of data:

A1 : I am sentence one.
B1 : Hey! I'm sentence two!
C1 : Could I be third sentence?

I expect to get this output :

A1 : I
A2 : am
A3 : sentence
A4 : one
A5 : .
A6 : Hey!
...

multiple options really but you could try:

In D1 and drag down:

=TRIM(MID(SUBSTITUTE(CONCATENATE($A$1&" "&$B$1&" "&$C$1)," ",REPT(" ",LEN(CONCATENATE($A$1&" "&$B$1&" "&$C$1)))),(ROW()-1)*LEN(CONCATENATE($A$1&" "&$B$1&" "&$C$1))+1,LEN(CONCATENATE($A$1&" "&$B$1&" "&$C$1))))

If you have TEXTJOIN() you can use that instead of CONCATENATE() like so:

=TRIM(MID(SUBSTITUTE(TEXTJOIN(" ",TRUE,$A$1:$C$1)," ",REPT(" ",LEN(TEXTJOIN(" ",TRUE,$A$1:$C$1)))),(ROW()-1)*LEN(TEXTJOIN(" ",TRUE,$A$1:$C$1))+1,LEN(TEXTJOIN(" ",TRUE,$A$1:$C$1))))

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM