Combining multiple collumns to create a single consolidated list

jonjonjonjon

New Member
Joined
Apr 26, 2017
Messages
12
Hi guys,

Is there a way to pick out cells that contain text from multiple columns and aggregate them into one single list?

eg: Problem:
redcircletable
squarebook
Bluetriangle pencil
green

<tbody>
</tbody>

Result needed:

red
Blue
green
circle
square
triangle
table
book
pencil

<tbody>
</tbody>
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi,

Based on (non-numeric) data in A1:E5, array formula**:

=IF(ROWS($1:1)>COUNTIF($A$1:$E$5,"?*"),"",INDIRECT(TEXT(SMALL(IF($A$1:$E$5<>"",10^5*ROW($A$1:$E$5)+COLUMN($A$1:$E$5)),ROWS($1:1)),"R0C00000"),0))

and copied down until you start to get blanks for the results.

Slightly more complex set-up if you insist on the returns being in order of their respective column positions, as opposed to row positions which the above favours.

Regards


**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
 
Upvote 0
ah sorry one more question!

What happens if the columns are separated with additional information that does not need to be taken into account?

Many thanks!
 
Upvote 0
Hi,

The targeted columns will be separated by several other irrelevant columns and are across multiple worksheets. So essentially taking specific columns across multiple worksheets and combining them into one list.

Kind Regards
 
Upvote 0
So you might have 2 columns from one worksheet, 3 from another, 10 from another, etc., all potentially separated within their respective worksheets by several columns?

Regards
 
Upvote 0
That's exactly right.

That said, note that the "separated by several columns" will be a constant number of columns, say 6. That is, the layout of each sheet is exactly the same - in each sheet, so i want columns 3, 9, 15, so on and so forth (so a difference of 6 columns).

Regards
 
Upvote 0
This is quite straightforward with VBA. Using worksheet formulas alone it is doable, though a touch complex.

What's your preference?

Regards
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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