The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Column merge question again
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

chau3352

USA
2 Posts

Posted - 09/11/2003 :  6:15:05 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I wasn't clear in my last posted message...I am trying to merge several columns into one column, but I am not trying to append the columns to the end of each other. I want to paste the information in each column SIDE BY SIDE into one column. An example would be that Column 1 has first names, Column 2 has middle names, and Column 3 has last names and I want to get them into one column that has the full name ( col 1 = Joe, col 2= Michael, col 3= Smith >>>> "Joe Michael Smith". Another way of looking at it is that I just want to dissolve the lines between some columns.
Thanks very much for the help!

easwar

USA
1965 Posts

Posted - 09/11/2003 :  10:16:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Here is one way to do this - there may be more elegant ways...

Let me assume you have a worksheet named Data1 that has three columns A, B, C with the text that you want to merge. Add a fourth column, D.

Then, copy and paste the following script lines to the script window, highlight all the lines, and press Enter to execute the script:

for(i=1; i<=10; i++)
{
%a=data1_a[i]$;
%b=data1_b[i]$;
%z=data1_c[i]$;
%z=%a %b %z;
data1_d[i]$=%z;
}


I am assuming above that you have 10 rows that you want to merge...
Also note that if you replace the second last line with:
%z=%a%b%z
then there will be no spaces between the merged words.

Easwar
OriginLab.



Edited by - easwar on 09/11/2003 10:21:07 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000