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
 Count specific value in row
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Fiogter

Germany
5 Posts

Posted - 04/25/2018 :  03:23:07 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi there,

I´m new to Origin and like to figure out, how to count how many times a specific value occurs in a row. I already tried to look it up in the Help section but for someone with next to no programming skills this page is pretty useless :(
In Excel it would be something like =COUNTIF(A1:A18; "3")

Best regards

Shirley_GZ

China
Posts

Posted - 04/25/2018 :  05:01:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Fiogter,

Origin also has a similar function, countif.
https://www.originlab.com/doc/LabTalk/ref/Countif-func

You can use the following way to count the specific value.


About how to define the range, see https://www.originlab.com/doc/LabTalk/guide/Range-Notation#Option_Switch_-vOption_Switches

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

Fiogter

Germany
5 Posts

Posted - 04/25/2018 :  05:28:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks for your reply. Even though im using the exact same setup as you in your picture i always get the error message:
incorrect number of arguments passed to function countif.

This error message was the main reason i made this post in the forum..

best regards
Go to Top of Page

Shirley_GZ

China
Posts

Posted - 04/25/2018 :  06:01:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Would you please tell me which version of Origin you are using? The range notation -v requires at least Origin 9.1 SR0, just as the help page mentioned.

And Could you send us the project file with problem to tech@originlab.com to let us check the details?

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

Fiogter

Germany
5 Posts

Posted - 04/26/2018 :  03:48:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Version: Origin 2017 (64-Bit) SR2 b9.4.2.380
I´ll send you a project file to the given email.

Best regards
Go to Top of Page

Fiogter

Germany
5 Posts

Posted - 04/26/2018 :  03:53:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok i found the problem:
The comma was always changed into a dot. If you use a ; it does 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