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
 need help in simple code writing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

finesniper

Hungary
4 Posts

Posted - 07/30/2014 :  11:11:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi all! I have this problem with my analysis, that I have two columns and a lot of rows. In the first row, the numbers are increasing, or staying the same (1,2,3,3,3,4,4,4,4,5,6,6,6,9,9,11...etc). In the other column, I have related values which seem totally random. What I need is to have two cloumns where in the first column, only the increasing values (and of course, the related values) remain, without the other values which are the same (so 1,2,3,4,5,7,8,11,12,13...etc). I hope it's clear. Basicly, the first colum is the number of the recorded sweep, and the second is the time of an action potential, and I only need the first anction potential from every sweep. Please help if you can with a code to make it easier for me.

Thank you everyone!

Olh Viktor Jnos

snowli

USA
1386 Posts

Posted - 07/30/2014 :  11:33:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Which version of Origin are you using?

You don't need to write code to do so:
Choose Worksheet: Remove Duplicated Rows.
Specify column A as reference column.
Set Merge Duplications by "Keep First Row"
Set Output worksheet to be <new> if u don't want to overwrite the source worksheet.

If you need code, use
wdeldup 1 //replace source worksheet with result
wdeldup 1 ow:=<new> //output result to new worksheet

Thanks, Snow
Go to Top of Page

finesniper

Hungary
4 Posts

Posted - 07/30/2014 :  11:51:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much, you are rigth, the first one is way easier!


Olh Viktor Jnos
Go to Top of Page

snowli

USA
1386 Posts

Posted - 07/30/2014 :  12:35:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
BTW, there is no Merge Duplications by control in 9.1. It's Keep 1st Duplication checkbox.

In coming 9.2, we changed it into a Merge Duplications by dropdown list so user can choose to keep 1st one, or last one, or some statistics quantities such as average, max, etc.

Sincerley, 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