Unable to find error!

Salvatore

New Member
Joined
Mar 9, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
In these days I'm struggling with a LAMBDA I found online that doesn't work, but for an incomprehensible reason.This is the function we could call CALENDAR:

=LAMBDA(Year,Month,Day,LET(INPUT,DATE(Year,Month,Day), A, EXPAND(TEXT(SEQUENCE(7), "ddd"),6+WEEKDAY(INPUT,1),""), B, DAY(SEQUENCE(EOMONTH(INPUT,0)-INPUT+1,,INPUT)), C, EXPAND(UPPER(TEXT(INPUT, "MMM")),7,,""), D, WRAPROWS(VSTACK(C,A,B),7,""),D))

The strange thing is that breaking it down with a simple LET .... works, but as soon as I assemble it as LAMBDA it goes into error.
Can you figure out why?
 
I can't understand it!

The formula automatically translated from English by opening the file is as follows:

=LAMBDA(Year;Month;Day;
LET(INPUT;DATA(Year;Month;Day);
A; ESPANDI(TESTO(SEQUENZA(7); "ddd");6+GIORNO.SETTIMANA(INPUT;1);;"");
B; GIORNO(SEQUENZA(FINE.MESE(INPUT;0)-INPUT+1;;INPUT));
C; ESPANDI(MAIUSC(TESTO(INPUT; "MMM"));7;;"");
D; A.CAPO.RIGA(STACK.VERT(C;A;B);7;"");D))

Exactly the same as mine

Except that if I take it from "name management" where it is correctly recorded and copy it to any cell followed by (2024;2;1) to do the calculation.... goes is error.

The formula contain an error.

However if I use its name - CALENDAR - it works correctly.

It is really something mysterious that has never happened to me.
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I find the problem.
The problem is in function TEXT.
This function translated into Italian is "TESTO," and the parameter "ddd" to indicate the day of the week is identified as "ggg."
Now, if I leave the parameter as in English the lambda works, but instead of days of the week "ddd" appears ... see image (the first is at file loading, the second shows that instead of days of the week "ddd" appears if I try to execute again. Third image shows the italian function TESTO in action.
The text function used by itself works correctly, but inserted in the lambda with the correct parameter, it goes into error.
ScreenShot00441.jpg

I do not know the reason, but these are the facts
 
Upvote 0
These behaviors in the "text" function and "name management" I think need to be analyzed by Microsoft.

You can alert them to the BUG
 
Upvote 0
Solution

Forum statistics

Threads
1,215,151
Messages
6,123,321
Members
449,094
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top