Ask Your Question
0

Pass cell position into LOCalc function

asked 2018-08-13 19:18:25 +0100

quazgar gravatar image

Hi, I want to use the distance (in columns) between two cells in a custom-written function, approximately like this:

Function foo(x, y)
  foo = column(x) - column(y)
End Function

Unfortunately all I could find is how to handle scalars or arrays passed as arguments, I could not find if it's possible to see where the values come from or any other way to pass cell references. Any hints on this?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-08-13 20:08:51 +0100

updated 2018-08-13 21:41:49 +0100

It is not possible to get an address of a reference passed to a user function. You need to pass address(es) explicitly, e.g. using ROW()/COLUMN().

edit flag offensive delete link more

Comments

Hmm, that's a real shortcoming, I think. I was hoping to do it in a way similar to e.g. the ROW() function which somehow does exactly this.

quazgar gravatar imagequazgar ( 2018-08-14 23:45:25 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-08-13 19:18:25 +0100

Seen: 43 times

Last updated: Aug 13 '18