Extra @ mark

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Juhanelet
Posts: 3
Joined: 06 Feb 2023, 05:19

Extra @ mark

Post by Juhanelet » 06 Feb 2023, 05:31

Hi,

I have var1 with value
=LAJITTELE(A600:I627;3)

I put it to active Excel cell with
xl.ActiveCell.Value := Var1

After that cell value is
=@LAJITTELE(A600:I627;3)

So it adds extra @ mark. Why and how to avoid that?

User avatar
boiler
Posts: 16709
Joined: 21 Dec 2014, 02:44

Re: Extra @ mark

Post by boiler » 06 Feb 2023, 08:55

It's because your formula returns multiple values, and that's how newer versions of Excel indicate it in the formula. More info here.

Juhanelet
Posts: 3
Joined: 06 Feb 2023, 05:19

Re: Extra @ mark

Post by Juhanelet » 07 Feb 2023, 01:01

boiler wrote:
06 Feb 2023, 08:55
It's because your formula returns multiple values, and that's how newer versions of Excel indicate it in the formula. More info here.
OK but the problem is that function does not work with that mark. If there is no way to avoid this I have to do this another way. Maybe using clipboard.

User avatar
flyingDman
Posts: 2776
Joined: 29 Sep 2013, 19:01

Re: Extra @ mark

Post by flyingDman » 07 Feb 2023, 12:32

I am not fluent in Finnish Excel but... if LAJITTELE is the same as SORT, use =LAJITTELE(A600:I627,3) (that is , rather than ; ), then do not use .Value but use .formula2. So something like this:

Code: Select all

xl := ComObjActive("excel.application")
xl.activesheet.range("X1").formula2 := "=LAJITTELE(A600:I627,3)"
14.3 & 1.3.7

User avatar
boiler
Posts: 16709
Joined: 21 Dec 2014, 02:44

Re: Extra @ mark

Post by boiler » 07 Feb 2023, 13:05

flyingDman wrote: use =LAJITTELE(A600:I627,3) (that is , rather than ; )
I'm thinking the ; is used as the parameter separator in that locale because the , is used as the decimal separator, as it often is in Europe.

User avatar
flyingDman
Posts: 2776
Joined: 29 Sep 2013, 19:01

Re: Extra @ mark

Post by flyingDman » 07 Feb 2023, 13:51

I had seen an example here: https://support.microsoft.com/fi-fi/office/lajittele-funktio-22f63bd0-ccc8-492f-953d-c20e8e44b86c
image.png
image.png (7.4 KiB) Viewed 370 times
14.3 & 1.3.7

Juhanelet
Posts: 3
Joined: 06 Feb 2023, 05:19

Re: Extra @ mark

Post by Juhanelet » 08 Feb 2023, 09:45

Thankyou. Using Formula2 instead of value solved the problem.

Yes, LAJITTELE is SORT. I would prefer use English formulas but our company uses Finnish version. And we are using semicolon as formula separator.

Post Reply

Return to “Ask for Help (v1)”