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
 finding index of 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

paul19

Germany
2 Posts

Posted - 08/05/2025 :  11:20:26 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi all,
I need to find the index of a certain cell, and am not sure how to do this.
Basically what I want is the value of a cell in the neighbour column of a max value cell.

for example:
A6309 is the max of col(A). I need the value of B6309. However, I don`t know where the max value of col(A) is.
The problem with =index is that the data set is not strictly monotone, therefor the output of the command is a default error value of "-2".

Would really appreciate timely help, thanks a lot!
Paul

Edited by - paul19 on 08/05/2025 11:21:57 AM

snowli

USA
1443 Posts

Posted - 08/05/2025 :  11:41:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Paul,

You can use lookup( ) function.
E.g. if you use it in cell formula or F(x) cell of a new column, enter =lookup(max(A), A, B)

If you will use it in LabTalk Script window, use lookup(max(col(A)), col(A), col(B))

It search max(A) in column A and give corresponding value in column B.

Thanks, Snow
Go to Top of Page

paul19

Germany
2 Posts

Posted - 08/05/2025 :  1:19:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Snow,
thanks a lot! That worked.
I`m just getting started with Origin, so basically Ive got no clue what I am doing.

Why do I need to use the version w/o col() when in a cell. Bc using =max(col(A)) works just fine.
Whats the difference between LabTalk Script window and normal in cell use?

obv not of importance, bc my problem is fixed now. But would be nice to know.
Thanks once again.

Edited by - paul19 on 08/05/2025 1:20:22 PM
Go to Top of Page

snowli

USA
1443 Posts

Posted - 08/05/2025 :  5:24:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You are welcome.
We also have View: Formula bar.
Click the Fx button there will pop up the Search window. You can type keywords to find functions.
Also if you select a column, Ctrl+Q to open Set Column Values dialog. There is Function menu to see categorized functions, e.g. u will see index, lookup, table under "Lookup & Reference", which may help you find what you are looking for.

Using A, A1, etc. will be much easier for user who is familiar with Excel formula.
https://www.originlab.com/doc/Origin-Help/Using-Formulae-to-Set-Cell-Values


Col(A), Col(A)[1] is Origin's own syntax.
If you are assigning column or cell formula in Window: Script Window, you will have to use our own syntax.



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