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

VanAwful

USA
12 Posts

Posted - 03/05/2024 :  9:40:13 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
v2024
Windows 10
In excel, I can easily compare two cell from different rows. I am not finding any way to do this in OriginLab Pro.

See example data below. I want to check if data in B matches the date in B of the previous and next rows. If the date is the same, keep moving to the next rows. When at the last row in which previous matches and the next do not, add up the number of rows with that same date and put the value in Col D.

A B C D
2024-03-02 02:44:51 909 1
2024-03-02 02:44:52 263
2024-03-02 02:44:52 263
2024-03-02 02:44:52 263 3
2024-03-02 02:44:53 263
2024-03-02 02:44:53 263
2024-03-02 02:44:53 263 3
2024-03-02 02:44:54 263
2024-03-02 02:44:54 263 2
2024-03-02 02:44:55 264 1

snowli

USA
1379 Posts

Posted - 03/06/2024 :  10:46:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,
Must the counts in D show in those rows?

If you just want to counts the number of same dates, you can highlight B and choose Statistics: Discrete Frequency...
Set Quantities to Computer as Count
Set Sort Data by: Ascending Values
Set Output as [input]Sheet1! //suppose Sheet1 is the current sheet
It will create two new columns with each unique B value and corresponding counts.

Thanks, Snow
Go to Top of Page

VanAwful

USA
12 Posts

Posted - 03/06/2024 :  3:29:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Snow,

Many thanks. That works. I was attempting to approach it like formulas in Excel. I have to think differently with OriginLab.
Go to Top of Page

snowli

USA
1379 Posts

Posted - 03/06/2024 :  5:17:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, we have many manipulation, etc. tools so not everything needs to be done by formula.

Just FYI there is other tools to reduce rows/columns based on reference column and get statistics values such as sum, mean, median, etc.
E.g. Worksheet:
Remove/Combine Duplicate Rows
Reduce Rows, Reduce Columns
Reduce by Group, etc.

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