Forum Discussion
aijatiw
Nov 03, 2023Copper Contributor
An UDF for Concatenate Function
Hello I was wondering whether it is possible to achieve this result using VBA/UDF? https://ibb.co/2yn729f Basically what I wanted to do is to be able to concatenate various string fr...
PeterBartholomew1
Nov 04, 2023Silver Contributor
I agree with Patrick2788 that there is little point in introducing VBA as a programming environment when worksheet formulas are sufficient. Now that dynamic arrays and recursion have made the worksheet formulas into a Turing complete language, that covers most computational tasks.
Another trick is to nest the Lambda functions to take two strings of parameters,
StudentYearλ
= LAMBDA(int, lnk, cls,
LAMBDA(param1, param2, CONCATENATE(int, " ", param1, " ", lnk, " ", param2, " ", cls))
)(intro, link, close)
This is still a Lambda function because only one parameter string is already provided. That allows a worksheet formula to return the appropriate message for a list of students
= StudentYearλ(Name, Year)
From there it is easy to envision related formulas generated from the same core such as
= StudentGradesλ(Name, Marks)