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

Thomas M

Germany
Posts

Posted - 05/03/2005 :  03:27:14 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 6.0
Operating System: w98

Hi,

I want to know if it is possible to seperate Data from one cell. For example, if the cell contains Data in the way hh:mm:ss, is it possible to transfer the hh to a new cell, the mm to an other and the ss to a third, make calculations and combine the results in one cell again, so that i got:

wks1:
col_1: hh:mm:ss -->

wks2:
col_1: hh
col_2: mm
col_3: ss -->

wks3:
col_1: hh':mm':ss'

Is there a way to do this? Maybe by position (1 and 2 are hh, 4 and 5 are mm, 7 and 8 are ss) ore by seperator (all before the first ":" are hh, all between the ":" are mm and all behint the second ":" are ss)?

Thanks in advance

azazell0

Hungary
Posts

Posted - 05/03/2005 :  3:46:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You'll need:
- three worksheets (for example, Data1, Data2, Data3);
- Data1_A and Data3_A should be set to Time and HH:mm:ss;
- your time vales typed to Data1_A.

Then, you can use the following LabTalk script (to run, either copypaste it to the script window (Alt+3), select it, and press enter OR create a text label somewhere on Data1, and copypaste it to its label control window - of course, select Button Up):

%q=Data1;
%r=Data2;
%s=Data3;

%r_A=int(%q_A*86400 / 3600);
%r_B=int(mod(%q_A*86400, 3600) / 60);
%r_C=mod(round(%q_A*86400), 60);

(In the first part, you can set your own wks names)

You can combine the three columns to Data3_A with the following LT line:

%s_A=(%r_a*3600+%r_b*60+%r_c) / 86400;

Hope it helps.
Go to Top of Page

azazell0

Hungary
Posts

Posted - 05/03/2005 :  4:06:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here's a project with all the stuff.

/ftp/forum_and_kbase/Images/time.opj
Go to Top of Page

Thomas M

Germany
Posts

Posted - 05/04/2005 :  04:17:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, it seems to work!
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