Author |
Topic  |
|
AKazak
Russia
1228 Posts |
Posted - 07/18/2022 : 08:04:46 AM
|
OriginPro 2023 (64-bit) Beta 1 10.0.0.47 Windows 7 Pro SP1 x64
Greetings!
What formula function can I use to to get row and col index of a specified cell?
Thank you.
--- Andrey |
|
YimingChen
1684 Posts |
Posted - 07/18/2022 : 09:59:44 AM
|
You can use wks.c1, wks.c2, wks.r1, wks.r2 to get the selection range.
James |
Edited by - YimingChen on 07/18/2022 09:59:57 AM |
 |
|
AKazak
Russia
1228 Posts |
Posted - 07/18/2022 : 11:03:38 AM
|
quote: Originally posted by YimingChen
You can use wks.c1, wks.c2, wks.r1, wks.r2 to get the selection range.
James
Dear James,
What should use to get row numbers of the cells in another column?
--- Andrey |
 |
|
YimingChen
1684 Posts |
|
AKazak
Russia
1228 Posts |
Posted - 07/18/2022 : 1:03:51 PM
|
quote: Originally posted by YimingChen
Do you mean you have multiple selections in a worksheet? Maybe you can use this X-function get_wks_sel.
https://www.originlab.com/doc/X-Function/ref/get_wks_sel
James
Dear James,
No, I don't. What formula can I use to get row indices in column И,

--- Andrey |
 |
|
YimingChen
1684 Posts |
Posted - 07/18/2022 : 5:11:08 PM
|
i, j for the current row and col index. Is this what you looking for?

James |
 |
|
AKazak
Russia
1228 Posts |
Posted - 07/19/2022 : 01:07:51 AM
|
quote: Originally posted by YimingChen
Do you mean you have multiple selections in a worksheet? Maybe you can use this X-function get_wks_sel.
https://www.originlab.com/doc/X-Function/ref/get_wks_sel
James
I tried to set the column formula to i, but sometimes it expands the numbers to the very bottom of the sheet instead of ending at the last line of the adjacent column.
The following formula worked in my case and delivers the row numbers and is limited by the specified column:
sum(1-IsEmpty(A))
Is there an simplier formula for this?
--- Andrey |
 |
|
YimingChen
1684 Posts |
Posted - 07/19/2022 : 09:03:22 AM
|
What about this expression? isna(A) ? na() : i
James |
 |
|
|
Topic  |
|