copying spread words to one column

%3CLINGO-SUB%20id%3D%22lingo-sub-1774360%22%20slang%3D%22en-US%22%3Ecopying%20spread%20words%20to%20one%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1774360%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EI%20teach%20basic%20excel%20and%20a%20student%20of%20mine%20asked%20me%20a%20question%20i%20did%20not%20know%20the%20answer%20to.%3C%2FP%3E%3CP%3EFor%20some%20reason%20he%20has%20got%20an%20excel%20sheet%20with%20lots%20of%20words%20spread%20in%20over%20columns%20and%20rows%2C%20some%20with%20empty%20cells%20in%20between%20some%20some%20without%20and%20with%20no%20order.%20He%20would%20like%20to%20copy%20all%20the%20words%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CU%3E%3CSTRONG%3Eone%20column%3C%2FSTRONG%3E%3C%2FU%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epreferably%20with%20no%20empty%20cells%20in%20between.%20I%20know%20i%20can%20copy%20any%20row%20and%20column%20seperately%20but%20imagine%20he%20has%20data%20in%20many%20many%20rows%20and%20columns%20and%20it%20will%20take%20a%20lot%20of%20time.%20I%20enclose%20a%20sample%20of%20what%20i%20mean.%20Of%20course%20his%20files%20are%20much%20bugger%20with%20many%20words.%3C%2FP%3E%3CP%3EThnak%20you%20for%20your%20answer%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1774360%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1774382%22%20slang%3D%22en-US%22%3ERe%3A%20copying%20spread%20words%20to%20one%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1774382%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F830235%22%20target%3D%22_blank%22%3E%40roniexcel2020%3C%2FA%3E%26nbsp%3BThe%20easiest%20would%20be%20to%20use%20PowerQuery%2C%20though%20this%20goes%20beyond%20%22basic%20Excel%22.%20Are%20you%20familiar%20with%20PQ%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1774383%22%20slang%3D%22en-US%22%3ERe%3A%20copying%20spread%20words%20to%20one%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1774383%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F830235%22%20target%3D%22_blank%22%3E%40roniexcel2020%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20example%20in%20A1%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DTEXTJOIN(%22%20%22%2CTRUE%2CB1%3AZ1)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EExpand%20the%20range%20if%20the%20data%20extend%20beyond%20column%20Z.%3C%2FP%3E%0A%3CP%3EThis%20can%20be%20filled%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi

I teach basic excel and a student of mine asked me a question i did not know the answer to.

For some reason he has got an excel sheet with lots of words spread in over columns and rows, some with empty cells in between some some without and with no order. He would like to copy all the words to one column preferably with no empty cells in between. I know i can copy any row and column seperately but imagine he has data in many many rows and columns and it will take a lot of time. I enclose a sample of what i mean. Of course his files are much bugger with many words.

Thnak you for your answer

3 Replies
Highlighted

@roniexcel2020 The easiest would be to use PowerQuery, though this goes beyond "basic Excel". Are you familiar with PQ?

Example attached.

Highlighted

@roniexcel2020 

For example in A1:

 

=TEXTJOIN(" ",TRUE,B1:Z1)

 

Expand the range if the data extend beyond column Z.

This can be filled down.

Highlighted

@roniexcel2020 

One more variant

image.png

is

=SORT(UNIQUE(INDEX(B18:D23,MOD(SEQUENCE(6*3,,0),6)+1,SORT(MOD(SEQUENCE(6*3,,0),3)+1))))