ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Utility: Convert Multiple Columns in Excel to a Single Column

(1/6) > >>

Renegade:
A fellow I work with is not very techno-savvy, and needs to collapse multiple columns in Excel into a single value.

I wrote a little utility to let him copy columns from Excel, paste into the utility, then copy back into a single column in Excel.

UTILITY (Tab Cleaner):


DOWNLOAD:
TabToSpaceCleaner.exe (159.5 kB - downloaded 509 times.)

PURPOSE:
Combine multiple columns (and rows) into a single column.

USAGE:
1) Copy columns (and rows) from MS Excel
2) Click first "PASTE" text box in the program
3) In Excel, double click a cell to deselect
4) Select a cell to paste new value(s)
5) Click second "COPY" text box in the program
6) In Excel, paste the value(s)
7) Done.

To change the separator, change the value in the "Tab Cleaner Text" box, e.g. change " - " to " " or ", " or whatever suits your purpose.

Here's an example showing columns I, J, and combined into column L:

DONE: Utility: Convert Multiple Columns in Excel to a Single Column


While I'm sure few people here would need it, I'm guessing that someone will find a use.


EDIT (forgot the requirements):

REQUIREMENTS:
Microsoft Windows 2000 or higher
.NET 2.0

skwire:
Nicely done.   :Thmbsup:

Target:
sorry, don't mean to critical, but couldn't you have just used a concatenation formula (=columnA & columnB & columnC)?

you could use a VBA macro to fill it in and paste the values (no dependencies, apart from Excel)

Renegade:
sorry, don't mean to critical, but couldn't you have just used a concatenation formula (=columnA & columnB & columnC)?

you could use a VBA macro to fill it in and paste the values (no dependencies, apart from Excel)
-Target (January 10, 2011, 12:45 AM)
--- End quote ---

Nope. Not possible. Like I said, "A fellow I work with is not very techno-savvy." :P :)

He'd have to do WAY too much BS to get things working. He can copy, and he can paste, and he can click. Macros? Waaaayyyy out. Get him to copy concatenation formulas (and have dependent cells)? Not gonna fly.

Nope. This was a quick hack to help him get column concatenated quickly without any extra information being needed.

It's hard working with anything in Excel given the funky way that Excel works with the clipboard, so there's that extra step to de-focus/de-select in there, but that's the only thing that's kind of icky.

But normally, yeah -- there are many other ways. This is just designed to work for a particular work-style.

Renegade:
Just for interest sake:


--- Code: C# ---private void textBox1_MouseClick(object sender, MouseEventArgs e)        {            this.textBox1.Text = Clipboard.GetText();            this.textBox2.Text = Clipboard.GetText().Replace("\t", this.textBox3.Text);        }         private void textBox2_MouseClick(object sender, MouseEventArgs e)        {            Clipboard.SetText(this.textBox2.Text);        }
Stupidly simple. (Should have error checking and stuff, but meh... whatever...)

Navigation

[0] Message Index

[#] Next page

Go to full version