| View previous topic :: View next topic |
| Author |
Message |
darth Newbie

Joined: 09 Feb 2009 Posts: 3
|
Posted: Mon Feb 09, 2009 8:23 pm Post subject: merging columns |
|
|
Hi folks! Sorry if this was already asked...
Is there any quick way of merging two columns? For example I have two columns
a 1
b 2
c 3
and I'd like to merge them such that I get
a1
b2
c3
in on single column. II couldn't find anything in the menus. For now I'm going through extra steps of copying the columns into unformatted text editors and importing the columns back, which gets annoying when I have to do it many times. I also wrote a C program to do that but I am sure there is simpler and quicker solution.
Thanks! |
|
| Back to top |
|
 |
Warrick Nelson OOo Advocate


Joined: 04 May 2004 Posts: 203 Location: Christchurch, New Zealand
|
Posted: Tue Feb 10, 2009 12:25 am Post subject: |
|
|
Assuming a,b and c are in column A and 1,2 and 3 in column B
=CONCATENATE(A1;B1) in cell C1 will give you the two together.
You can then cut and paste as text, either over them or elsewhere. |
|
| Back to top |
|
 |
Dimkin Newbie

Joined: 10 Feb 2009 Posts: 1
|
Posted: Tue Feb 10, 2009 1:58 am Post subject: |
|
|
Hello! I'm having the same problem I've got lots of information in two cells and i need to combine them together
Example:
aaaaa 123
bbbbb 1233
ccccc 1434
I have around 5000 of thoose. Somehow the function =CONCETENATE does nothing.
Anyone have any other solution?
darth: I've just finished my C sclass could you maybe explain how you wrote the program in C so I will be able to write it?
Thanks in advance! |
|
| Back to top |
|
 |
Warrick Nelson OOo Advocate


Joined: 04 May 2004 Posts: 203 Location: Christchurch, New Zealand
|
Posted: Tue Feb 10, 2009 10:12 am Post subject: |
|
|
| Check your spelling |
|
| Back to top |
|
 |
darth Newbie

Joined: 09 Feb 2009 Posts: 3
|
Posted: Wed Feb 11, 2009 3:50 pm Post subject: |
|
|
Hi guys!
Warrick: thanks for your reply! I get an error when I try to do what you suggested, but using the keyword "CONCATENATE" in Google, I found a solution. Turns out that you don't need to use this function, one can just say
=A1&B1
to merge the contents of cells A1 and B1.
Dimkin: try that first, it works for me. A C program is not a practical solution at all. I had to write it because I don't know perl or python and I keep forgetting the syntax for awk and sed
Cheers! |
|
| Back to top |
|
 |
Warrick Nelson OOo Advocate


Joined: 04 May 2004 Posts: 203 Location: Christchurch, New Zealand
|
Posted: Wed Feb 11, 2009 9:04 pm Post subject: |
|
|
Thanks Darth
the & is sure quicker to type than Concatenate
Not sure why concatenate is not working for you, I'm using OOo 3.0.1 on WinXP. |
|
| Back to top |
|
 |
darth Newbie

Joined: 09 Feb 2009 Posts: 3
|
Posted: Wed Feb 11, 2009 11:38 pm Post subject: |
|
|
| Hmm, this is strange. After I saw your reply, I booted to windows where I have the same version of Open Office, and concatenate works. I normally use Linux, and concatenate didn't work there. |
|
| Back to top |
|
 |
|