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
 All Forums
 Origin Forum
 Origin Forum
 finding index of cell

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
paul19 Posted - 08/05/2025 : 11:20:26 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 08/05/2025 : 5:24:44 PM
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
paul19 Posted - 08/05/2025 : 1:19:28 PM
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.
snowli Posted - 08/05/2025 : 11:41:14 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000