lookup() function bug?

Post Reply
vito
Posts: 1
Joined: Fri May 05, 2023 11:35 pm

lookup() function bug?

Post by vito »

lookup returns wrong value instead of error, see screenshot attached

lookup.png
lookup.png (4.97 KiB) Viewed 3751 times
stascheit
Posts: 73
Joined: Fri Nov 09, 2018 11:34 am

Re: lookup() function bug?

Post by stascheit »

The behaviour is correct (and corresponds also to Excel).

See the description in the manual:
Note:
If LOOKUP does not find a value that exactly matches Crit, the next smaller value is automatically taken.
If no smaller value exists because Crit is smaller than the smallest value available, the function returns the #N/A error value.
An error value is returned, if you have an example like this (Crit is smaller than the smallest value available):
Attachments
Lookup.png
Lookup.png (7.31 KiB) Viewed 3679 times
Devonboy78
Posts: 49
Joined: Sat Apr 08, 2023 5:24 pm

Re: lookup() function bug?

Post by Devonboy78 »

Just a small point; If the command is typed in as shown in the example =LOOKUP(3;A1:A3;B1:B3) ,Planmaker will report an error in formula Invalid characters.
The formula should read =LOOKUP(3,A1;A3,B1:B3) in order to work (manual, page 682, Syntax LOOKUP(Crit, LookupVector, ResultVector)
stascheit
Posts: 73
Joined: Fri Nov 09, 2018 11:34 am

Re: lookup() function bug?

Post by stascheit »

Sorry, my mistake. I used the European locale for list separators and cell range and not the US/UK locale.
But also vito does...
Post Reply

Return to “BETA PlanMaker 2024 for Windows”