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
 Data transformation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Idole

2 Posts

Posted - 04/06/2017 :  04:40:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello the Origin community!

I was wondering if someone knows how to transform this type of worksheet:

1 A1 B1
1 A2 B2
1 A3 B3
1 A4 B4
2 A1 B1
2 A2 B2
2 A3 B3
2 A4 B4

into this format:

1 A1 B1 A2 B2 A3 B3 A4 B4
2 A1 B1 A2 B2 A3 B3 A4 B4


Or if it is simpler, going from

A1 B1
A2 B2
A3 B3
A4 B4

to

A1 B1 A2 B2 A3 B3 A4 B4

Many thanks for you help!


Edited by - Idole on 04/06/2017 05:51:55 AM

arstern

USA
237 Posts

Posted - 04/06/2017 :  09:10:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use the transpose dialog box. Select your columns that you want to transpose and then select Worksheet from the menu bar --> Select Transpose and Select Open Dialog. After you select OK the worksheet will switch the columns to rows. Therefore if you want to keep a copy of the original worksheet, you may want to duplicate the worksheet before completing the transpose.



--Aviel Stern
OriginLab
Go to Top of Page

Idole

2 Posts

Posted - 04/07/2017 :  02:46:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Aviel,

Many thanks for your help! However, (if I did it correctly) you solution is only transposing my columns into row but does not condense the second and third columns into one row per value of the former first column (hopefully it is clear enough).

I have issues keeping the order A1 B1 A2 B2 A3 B3 etc...

It is doable on excel with a formula of this type:
=INDEX($B$21:$C$38,INT((ROWS(F$3:F4)-1)/2)+1,MOD(ROWS(F$3:F4)-1,2)+1)
but it is one step of my data treatment and all the others are easier on Origin (reason why I would like to know if it is possible)
Is this simpler to open a excel sheet in Origin, treat the data and then copy paste the result on an Origin sheet to keep going with the rest of the data analysis?

Many thanks


Edited by - Idole on 04/07/2017 02:50:31 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 04/07/2017 :  07:46:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If your data is numeric, and just from two sets into one, then you can use the labtalk copy -z command. See for example

copy -z col(1) col(2) col(3);




CP
Go to Top of Page

snowli

USA
1397 Posts

Posted - 04/07/2017 :  10:31:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,
In Origin 2017, you can use Worksheet: Split Columns... menu for this.

1. Highlight the two columns (those 2 columns).
2. Choose Worksheet: Split Columns...
3. Set Subgroup Method as follows.
--> You will get a new sheet with exepected result.



Thanks, Snow
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