top of page

More LAMBDA Bread...with Recursion!



I must say I’m feeling somewhat vindicated in my long and extensive use of Name Manager. It is an essential tool in elegant design for its referencing, processing and documenting capabilities. LAMBDAs carry some risk for inexperienced users, but they offer a great opportunity.


I now have categories of LAMBDAs to manage, for which the comment field is invaluable. It not only provides a place to list and explain inputs and outputs, but by establishing a naming convention, Name Manager can be sorted by it to catalog names. Comments are also displayed on entry, as shown below.


This post is an update to my earlier post on LAMBDA functions here. I’ve cooked up another batch of various general types. I’ve incorporated LET for transparency, and even found two uses for recursion. Following are five showcase examples, followed by a list of all my LAMBDAs to date in two categories, General and Math.


First I’ll point out one issue with LAMBDAs. Whenever you start typing a function, such as “=A” you get a list of all the functions or names that match, and you can continue typing, or scroll down the list to the one and hit Tab to select it. This gives the opening parenthesis, and shows the list of arguments you need to enter. You should expect LAMBDAs to work the same, but this behavior is inconsistent.


Of the 46 LAMBDAs I’ve created so far, 39 work as expected in entry assist, 7 do not. Tab does not add the opening parenthesis, and even after typing it, the argument list is not raised. I have not found any cause for it. My workaround is to ensure that every function has the arguments listed in the name comment field, which is always raised when browsing the function list, or by hitting Backspace until it appears.

argument list may or may not appear, comment always appears

Contents:

Calendar

In Startup.xlsm is a “Calendar” sheet, explained in the blog post, with perpetual calendar, holiday calculator and highlighting of various types of dates. This sheet is then reapplied in other files. Sometimes, you just want a quick way to create a current calendar, say for the next several weeks, without having to type or copy a lot of formulas and formats. I’ll do this with a LAMBDA, with 4 arguments for flexibility, and several LET names for transparency.


Formula

The heart of it is the SEQUENCE function to produce an array of 7 columns.

Calendar =LAMBDA(month,week,weeks,format,LET(

weekstart,IF(week=2,2,3),

from,IF(month>120,month,EDATE(TODAY(),month)),

startday,EOMONTH(from,-1)+1,

days, SEQUENCE(IF(weeks,weeks,5),7,startday-WEEKDAY(startday,weekstart)),

isfom,DAY(days)=1,

TEXT(days,IFERROR(CHOOSE(format,"m/d",IF(isfom,"mmm d","d"),"m/d/y", IF(isfom,"mmm d, y","d"),"d.m.y",IF(isfom,"d mmm y","d")),"d"))))


Formula breakdown:

  1. LET “weekstart” mean an index to set first of week Sun if “week”=2, else Mon (see 4.)

  2. LET “from” mean +/- offset number of months, up to 120, or a date if larger than 120

  3. LET “startday” mean first of month = EOMONTH of the previous month +1 day

  4. LET “days” mean SEQUENCE of “weeks” rows, default 5; 7 columns; starting from “startday-WEEKDAY(startday,weekstart)”

  5. LET “isfom” mean DAY(days)=1, TRUE on first of each month

  6. Output TEXT of “days” array, with CHOOSE of “format” from:

    1. 1=”m/d”

    2. 2=”mmm d” on first of each month, else “d”

    3. 3=”m/d/y”

    4. 4=”mmm d, y” on the first of each month, else “d”

    5. 5=”d.m”

    6. 6=”d mmm” on the first of each month, else “d”

    7. 7=”d.m.y”

    8. 8=”d mmm y” on the first of each month, else “d”

    9. Any other value = “d” for all days

Here’s an example output with a dashboard to show the arguments. The year here is 2022. Year cannot be determined from cells in “d” format, which are not interpreted as dates – or rather, they are dates in January 1900. The year can be shown by YEAR(ref) of any cell that looks like a date (Mar 1, etc.), or by selecting one of the formats that includes year.


Format

I chose to output the array as pre-formatted text to avoid subsequent formatting steps. The alternative is to output date numbers. This would allow for further processing, as shown in Startup: Calendar Sheet, but requires manually setting the number format as desired.


Another reason for text array output is it enables annotating the array. It must be converted to values first (copy whole array, paste values), then any day cell can be edited, with Alt+Enter to add a note on a second line. If this is done, or if row height is increased at all, it’s best to select-all and top-align.


To add a weekday header, it’s easy enough to use Excel’s built-in list of days. For example, type “Sun” above the first column, and drag the cell corner across to “Sat”. I’ve also added another LAMBDA for convenience, using the same parameter for 2=Sun or default Mon.


CalendarHeader =LAMBDA(start,IF(start=2,{"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}, {"Mon","Tue","Wed","Thu","Fri","Sat","Sun"}))


The last optional enhancement I’ll mention is borders. If the calendar is dynamic, i.e. generated by the LAMBDA function, this should be done in Conditional Formatting to keep up with changes, example below:



If the calendar is static, i.e. converted to values, it’s simple enough to do manually. In either case, if you might print then you’ll want to start with a lighter border around each cell, such as dotted line.


CardDeal

I’ve enjoyed building some games in Excel, a sampling of which is presented in the Fun and Games.xlsm file. This file includes a poker game with two hands of five cards. Here I’m looking to make a LAMBDA that will pick any number of random cards from the deck, without repetition.


I tried to find a recursive solution that would build a hand card by card, picking each one from the deck, which was to be reduced by the previous card dealt. It’s theoretically possible, but after reasonable effort, I resorted to a search for “random array without repetition”, and reviewed the top solutions. My favorite is by Svetlana Cheusheva at Ablebits.com, shown here in which “n” items are randomly selected from “data”.


=INDEX( SORTBY(data, RANDARRAY( ROWS(data))), SEQUENCE(n))


It’s one thing to appear unique, especially where the selection is much smaller than the population, in which case duplicates are less likely anyway. Many iterations might reveal an unwanted duplicate, as in the case of one of the solutions reviewed. It’s another thing to be convincingly reliable on the objective.


What I liked about this solution is first its simplicity, and second the use of RANDARRAY without the integer flag in SORTBY of the data. When the integer flag is FALSE or omitted, the random numbers generated are between 0 and 1, with 15 decimal places. This makes it practically impossible to get duplicates. Even if you did get duplicate randoms, INDEX would still return unique items.


Once I’d satisfied my testing appetite, I then created an array constant of a pack of cards, using Unicode symbols 9824(♠), 9827 (♣), 9829(♥), 9830(♦).


CardPack ={"2♠";"3♠";"4♠";"5♠";"6♠";"7♠";"8♠";"9♠";"T♠";"J♠";"Q♠";"K♠";"A♠"; "2♣";"3♣";"4♣";"5♣";"6♣";"7♣";"8♣";"9♣";"T♣";"J♣";"Q♣";"K♣";"A♣"; "2♥";"3♥";"4♥";"5♥";"6♥";"7♥";"8♥";"9♥";"T♥";"J♥";"Q♥";"K♥";"A♥"; "2♦";"3♦";"4♦";"5♦";"6♦";"7♦";"8♦";"9♦";"T♦";"J♦";"Q♦";"K♦";"A♦"}


As a side note, the Unicode symbols can be used in Conditional Formatting to turn the font red on cells that contain “♥” or “♦”.


Now, a deal of cards is defined by the pack and the number of cards dealt. I can use the array CardPack as pack, or a range.


CardDeal =LAMBDA(pack,cards, INDEX(SORTBY(pack,RANDARRAY(ROWS(pack))),SEQUENCE(cards)))


Here’s an example 5-card hand, with the value of two pairs:



This is a far cry from the poker game mentioned above and explained here, which has two hands for single-player self-competition, hold buttons, deal counter, scoring and tie-breaking, and winner announcement. The poker VBA routine even deals correctly, one card at a time per player on the first round, then all replacement cards to each player in turn. It’s fun. Perhaps this LAMBDA will come in handy in a future remake.


DieRoll

Dice are another way to present numbers, or to visually portray a random selection. Common games use from one to five dice to build numbers and patterns. Fun and Games.xlsm has a simple game of two pairs of dice, as described here. The logic is simple to put in LAMBDA form. It uses six array constants to represent the six die faces, and selects a given or randomized number from them, displaying a dot symbol for each spot on the face.


=LAMBDA(roll,IF(CHOOSE(IF(N(roll),MIN(MAX(INT(roll),1),6),RANDBETWEEN(1,6)), {0,0,0;0,1,0;0,0,0},{1,0,0;0,0,0;0,0,1},{1,0,0;0,1,0;0,0,1},

{1,0,1;0,0,0;1,0,1},{1,0,1;0,1,0;1,0,1}, {1,1,1;0,0,0;1,1,1}),UNICHAR(9679),""))


The six array constants each define a 3x3 array of 0 and 1, where 1 represents the dot positions. If a roll input argument is given, it is conformed to the 1-to-6 range by a combination of MIN and MAX. If roll input is not given, a RANDBETWEEN 1 and 6 is picked. CHOOSE then uses the resulting value to pick the corresponding array, and finally IF(array,dot,””) displays the die face.


However frivolous this may be, if used there are a few tips to know.

  1. Make a square grid. Find the standard row height in pixels, and set the column widths to the same pixels. See image below.

  2. Set center vertical and horizontal center alignment

  3. Set outline border (Shift+Ctrl+7) around each 3x3 die face

  4. To use the die values in calculations, two options:

    1. Roll the die as random and use =COUNTIF(C5#,"●") to get the value

    2. Put RANDBETWEEN in a cell and use it as source for both die and formula

Setting pixel width equal to pixel height
Examples to get or feed die values

Password

This password generator uses recursion to concatenate any number of randomly selected items from a given list of characters. The character list can be a range of cells or an array constant, elements of which would logically but not necessarily be single characters. The character list should be designed to reflect allowable characters in the appropriate proportion for best results. Random selection occurs independently, that is, repeats are allowed.


Password =LAMBDA(charlist,length,IF(length<1,"",ARRAYTOTEXT(INDEX(charlist,

RANDBETWEEN(1,COUNTA(charlist)))&Password(charlist,length-1))))


COUNTA gives the number of non-blanks in the list; RANDBETWEEN picks one of that number; INDEX returns the respective character. ARRAYTOTEXT is added with the default concise format, to remove array brackets and quotes when the result is copied, in case charlist is an array. This is not needed when charlist is a range, but has no effect. The result is captured by converting the formula to value in-cell by F2 to edit – F9 to convert – Ctrl+C to copy – Esc to cancel.


I created some character arrays in Name Manager for convenience. An easy way to do this is to type the list in a column and use ARRAYTOTEXT with strict format (1). This returns the text representation of the array, which can then be copied and pasted into Name Manager. Copy the value in-cell as above, then paste into the name preceded by “=”.


Use ARRAYTOTEXT to convert a range to array constant

Array constants are handy to enter a list in the sheet or to use in formulas.


Example array constants

Here are some examples of passwords generated using the three arrays above. If the result does not comply with a particular set of password rules, editing the character list or simply tapping F9 may bring a solution.



PermutationsAll

Purpose

In Startup.xlsm is a “Combinations” sheet, including both Permutations and Combinations. The purpose and design of this sheet is explained in the blog here, and is worth a review. In short, we’re picking a selection of “r” items from a population of “N” total items, and there are various ways to enumerate the possible selections. These concepts are more valuable than is generally understood due to their cryptic definitions, and potential users will benefit from clear explanation with examples. My favorite site for explaining the concepts and calculations is mathsisfun.com.


Excel has four functions, Permutations with and without repeats, and Combinations with and without repeats. These functions only provide the number of possible selections, not the selections themselves. That’s why I built the sheet, to visualize what they mean. Now that I’m exploring LAMBDA applications, I’m looking for a concise solution with array output.


As explained in the blog link above, all four options begin with PERMUTATIONA(), or Permutations with repeats, which gives all possible “combinations”. Think of a 3-digit padlock, which can have 10^3=1000 solutions, from 000 to 999. From that list, each other variant is reduced by filtering out repeats, duplicates or both.


Repeats refers to two or more picks of the same item. If you pick unique bingo calls from a box and you do not return them to the box, there can be no repeats. Duplicates refers to the same selection when order doesn’t matter – AAB is equivalent to ABA and BAA. Duplicates are included in Permutations, and excluded from Combinations.


The Combinations sheet header summarizes the four functions, allows for entry of N and r, and is followed by a calculated table of the actual members. This simple example of “pick 2 from 3” clearly shows how repeats and duplicates are removed successively.


Startup.xlsm Combinations sheet, "pick 2 of 3"

Note that when repeats are allowed (functions ending in “A”), it is possible to pick more items than the total number of items, since you are recycling the items. When repeats are not allowed (functions NOT ending in “A”), r cannot be greater than N, and those functions return an error. In the example below of “pick 3 from 2”, think of it like coin flipping, where 1 is heads and 2 is tails. There are only two outcomes, but you can flip an unlimited number of times.


"Pick 3 of 2"

Permutations with Repeats

This is the easiest variant to understand and to program because it’s like building a number system in base N. The number of possibilities is =N^r. I thought it would be cool to use recursion somehow to generate the output array. It seemed a tantalizing but improbable solution. Based on my experience with the sheet, I thought I would limit the picks to six, and with that reasonable limit, a brute-force concatenation of picked items seemed the only practical way. This resulted in an ugly formula with lots of repetition, and little promise of reapplication.


So I went back to the drawing board, starting with a review of recursive LAMBDA videos to get ideas, then to a blank sheet. The work already spent made the foundation of step-by-step development. After a few hours in the cauldron, I settled on an imperfect but reasonable solution. Inputs are (select,hold,from); “select” is the number of items to pick, “hold” must equal “select”, and “from” is a range or array of items.


PermutAllList =LAMBDA(select,hold,from,LET(

Items,ROWS(from),

Total, SEQUENCE(PERMUTATIONA(Items,hold)),

Repeat,Items^(select-1),

Ticker,MOD(ROUNDUP(Total/Repeat,0),Items),

Digit,IF(Ticker,Ticker,Items),

IF(select<1,"",INDEX(from,Digit)&PermutAllList(select-1,hold,from))))


This formula uses recursion to build a “select"-digit index of the Permutations against the “from” list of items, digit by digit. As noted, it’s helpful to think of numbers of “r digits” of “base N”. Here is the formula breakdown:

  1. LET “Items” mean the number of items to select from (N=base), counted as ROWS(from)

  2. LET “Total” mean a SEQUENCE array with PERMUTATIONA (=items^hold) rows

  3. LET “Repeat” mean “Items to the select-1 power”, which determines how many times to repeat each item in the current, “select’th” significant digit. For example, selecting 3 from digits 0-9 gives 1000 results, and each digit repeats 10^2 times in the hundreds place.

  4. LET “Ticker” mean the cycle of repeated items. ROUNDUP of Total/Repeat goes from 1 up to ROWS(Total)/Repeat. MOD gives the remainder of the ROUNDUP value divided by Items. This cycles from 1 up to Items-1, then returns 0 when the ROUNDUP value is a multiple of Items.

  5. LET “Digit” mean the same as “Ticker”, but replace 0 with Items.

  6. Create the recursion exit, IF(select<1,””, then create output:

  7. Index the “from” list by “Digit”, then:

  8. Recurse and concatenate the function using “select-1” in place of “select”

Returning to the intuitive example of the base 10 numbering system, select 3, the first round calculates the hundreds digit, repeating 0 through 9 a hundred times each. The next round adds the tens digit, repeating 0 through 9 ten times each per hundred. The third and final round adds the ones digit likewise. Below is another simple example.


Example output

Now, why does the LAMBDA need both “select” and “hold”, which must be equal? The “select” argument is decremented in each recursion round, while the “Total” array must remain constant, based on the original "select" value. The workaround for this is to enter the same value as two arguments; “hold” for constant Total, and “select” for recursion. Not as elegant as I’d like, but workable for now.


Note below that N^r quickly gets way out of practical range. For example, if I were picking from the 26 letters of the alphabet, I would not want to pick more than 3. In a future version I’ll add some governance.



I believe someone smarter than I will improve on my solution for PERMUTATIONA members, remove the duplicated input, and perhaps go on to develop PERMUT, COMBINA and COMBIN solutions. Meanwhile, these are challenges I have to look forward to.


General LAMBDA Functions

inList

=LAMBDA(list,item,COUNTIF(list,item)>0)

Comment: LAMBDA General Boolean: (list,item)

Output: Boolean


Age

=LAMBDA(birthdate,ROUNDDOWN((TODAY()-birthdate)/365.25,0))

Comment: LAMBDA General Date: (birthdate)

Output: number


Quarter

=LAMBDA(dateormonth,type,LET(qtr,ROUNDUP(IF(dateormonth>12,MONTH(dateormonth), dateormonth)/3,0),IF(N(type),qtr,CHOOSE(qtr,"JFM","AMJ","JAS","OND"))))

Comment: LAMBDA General Date: (dateormonth,type) dateormonth<=12 is month, >12 is date; type 0 returns JFM,AMJ,JAS,OND, type 1 returns 1-4

Output: number (1-4) or string (JFM,AMJ,JAS,OND)


Calendar (see a)

=LAMBDA(month,week,weeks,format,LET(

weekstart,IF(week=2,2,3),

from,IF(month>120,month,EDATE(TODAY(),month)),

startday,EOMONTH(from,-1)+1,

days,SEQUENCE(IF(weeks,weeks,5),7,startday-WEEKDAY(startday,weekstart)),

isfom,DAY(days)=1,

TEXT(days,IFERROR(CHOOSE(format,

"m/d",IF(isfom,"mmm d","d"),"m/d/y",IF(isfom,"mmm d, y","d"),

"d.m",IF(isfom,"d mmm","d"),"d.m.y",IF(isfom,"d mmm y","d")),"d"))))

Comment: LAMBDA General Date: (month,week,weeks,format) returns array (weeks)R x 7C; month is +/- offset months if <=120 else date; week 2=start Sun, else Mon; format default "d", or 1="m/d",3="m/d/y",5="d.m",7="d.m.y";2,4,6,8 = "d" with "mmm" day 1 of each month

Output: array, “weeks” rows x 7 columns


CalendarHeader

=LAMBDA(start,IF(start=2,{"Sun","Mon","Tue","Wed","Thu","Fri","Sat"},{"Mon","Tue","Wed","Thu","Fri","Sat","Sun"}))

LAMBDA General Date: (start) 2=Sun, else Mon

Output: array, 1 row x 7 columns


LoanTotalInterest

=LAMBDA(rate,nper,pv,type,DOLLAR(CUMIPMT(rate,nper,pv,1,nper,type)))

Comment: LAMBDA General Finance: (rate,nper,pv,type)

Output: number


LoanTotalInteresttoPrinciple

=LAMBDA(rate,nper,pv,type,CUMIPMT(rate,nper,pv,1,nper,type)/ CUMPRINC(rate,nper,pv,1,nper,type))

Comment: LAMBDA General Finance: (rate,nper,pv,type) returns ratio of interest to principle

Output: number


CircleNumber

=LAMBDA(number,type,LET(dark,N(type),seg,IFNA(MATCH(number,{0,1,11,21}),4), IFERROR(UNICHAR(CHOOSE(seg,IF(dark,9471,9450),number+IF(dark,10101,9311), number+IF(dark,9440,9311),"")),"")))

Comment: LAMBDA General Number: (number,type) number must be 0 to 20; type 0 ⓪①②...⑳; type 1 ⓿❶❷...⓴

Output: string, length 1


CardDeal (see above)

=LAMBDA(pack,cards,INDEX(SORTBY(pack,RANDARRAY(ROWS(pack))),

SEQUENCE(cards)))

Comment: LAMBDA General Number: (pack,cards) returns vertical array

Output: array, “cards” rows x 1 column


DieRoll (see above)

=LAMBDA(roll,IF(CHOOSE(IF(N(roll),MIN(MAX(INT(roll),1),6),RANDBETWEEN(1,6)), {0,0,0;0,1,0;0,0,0},{1,0,0;0,0,0;0,0,1},{1,0,0;0,1,0;0,0,1},

{1,0,1;0,0,0;1,0,1},{1,0,1;0,1,0;1,0,1}, {1,1,1;0,0,0;1,1,1}),UNICHAR(9679),""))

Comment: LAMBDA General Number: (roll) 1 to 6, randomized if roll=0 or text; returns 3x3 array

Output: array, 3 rows x 3 columns


ColumnWidth

=LAMBDA(ref,"c "&IF(ISREF(ref),CELL("col",ref),CELL("col"))&" w "& INDEX(IF(ISREF(ref),CELL("width",ref),CELL("width")),,1)&

IF(INDEX(IF(ISREF(ref),CELL("width",ref),CELL("width")),,2)," default"," custom"))

Comment: LAMBDA General Sheet: (ref) if ref not ISREF, active cell

Output: string with column number, width and width type, min length 14


CellFormat

=LAMBDA(ref,LET(first,LEFT(IF(ISREF(ref),CELL("format",ref),CELL("format")),1), IF(first<>"D",SWITCH(first,"G","General","F","Number",",","Number",

"C","Currency","P","Percent","S","Scientific"),LET(second,RIGHT(IF(ISREF(ref),

CELL("format",ref), CELL("format")),1),IF(second<"6","Date","Time")))))

Comment: LAMBDA General Sheet: (ref) if ref not ISREF, active cell, can be same cell

Output: string, length 4-10


Password (see above)

=LAMBDA(charlist,length,IF(length<1,"",ARRAYTOTEXT(INDEX(charlist, RANDBETWEEN(1,COUNTA(charlist)))&Password(charlist,length-1))))

Comment: LAMBDA General String: (charlist,length)

Output: string, length as input


UnitKGtoLB

=LAMBDA(number,type,LET(change,CONVERT(number,"kg","lbm"),

IF(N(type),change,number&" kg = "&TEXT(change,"#,##0.00")&" lbm")))

Comment: LAMBDA General Units: (number,type) type 0 = string, type 1 = value

Output: number or string, min length 14


UnitKMtoMI

=LAMBDA(number,type,LET(change,CONVERT(number,"km","mi"),

IF(N(type),change,number&" km = "&TEXT(change,"#,##0.00")&" mi")))

Comment: LAMBDA General Units: (number,type) type 0 = string, type 1 = value

Output: number or string, min length 14


UnitLBtoKG

=LAMBDA(number,type,LET(change,CONVERT(number,"lbm","kg"),

IF(N(type),change,number&" lbm = "&TEXT(change,"#,##0.00")&" kg")))

Comment: LAMBDA General Units: (number,type) type 0 = string, type 1 = value

Output: number or string, min length 14


UnitMItoKM

=LAMBDA(number,type,LET(change,CONVERT(number,"mi","km"),

IF(N(type),change,number&" mi = "&TEXT(change,"#,##0.00")&" km")))

Comment: LAMBDA General Units: (number,type) type 0 = string, type 1 = value

Output: number or string, min length 14


Math LAMBDA Functions

LineY

=LAMBDA(x,slope,intercept,slope*x+intercept)

Comment: LAMBDA Math Algebra Line: (x,slope,intercept)


LineIntercept

=LAMBDA(x,y,slope,y-slope*x)

Comment: LAMBDA Math Algebra Line: (x,y,slope)


LineSlope

=LAMBDA(x,y,xxorb,yy,IFERROR(IF(LEN(yy),(yy-y)/(xxorb-x),(y-xxorb)/x),""))

Comment: LAMBDA Math Algebra Line: (x,y,xxorb,yy) xxorb=intercept b if yy blank, else xx; slope m=(y-b)/x OR (yy-y)/(xx-x)

Output: if vertical line blank, else number


Quadratic

=LAMBDA(a,b,c,LET(seg,SQRT(b^2-4*a*c),pos,(-b+seg)/(2*a),neg,(-b-seg)/(2*a), stat,1*ISERR(pos)+2*ISERR(neg)+1,CHOOSE(stat,pos&","&neg,neg,pos,"no solution")))

Comment: LAMBDA Math Algebra Quad: (a,b,c) outputs comma-separated solutions

Output: blank, one number or two numbers in one cell


IsPrime

=LAMBDA(number,IF(OR(number<2,MOD(number,1)),FALSE,

IFERROR(OR(number=2,AND(MOD(number,

SEQUENCE(ROUNDUP(SQRT(number),0)-1,,2))<>0)),FALSE)))

Comment: LAMBDA Math General Prime: (number), Boolean

Output: Boolean


PermutationsAll (see above)

=LAMBDA(select,hold,from,LET(

Items,ROWS(from),

Total,SEQUENCE(PERMUTATIONA(Items,hold)),

Repeat,Items^(select-1),

Ticker,MOD(ROUNDUP(Total/Repeat,0),Items),

Digit,IF(Ticker,Ticker,Items),

IF(select<1,"",INDEX(from,Digit)&PermutationsAll(select-1,hold,from))))

Comment: LAMBDA Math General Prob: (select,hold=select,from array) returns 1C array of Permutations WITH repeats (ALL possible)

Output: array, P rows x 1 column


Circumference

=LAMBDA(radius,2*PI()*radius)

Comment: LAMBDA Math Geometry 1D1: (radius)


PerimeterCircle

=LAMBDA(radius,2*PI()*radius)

Comment: LAMBDA Math Geometry 1D1: (radius) same as circumference


Hypotenuse

=LAMBDA(a,b,SQRT(a^2+b^2))

Comment: LAMBDA Math Geometry 1D3: (a,b)


PerimeterTriangle

=LAMBDA(a,b,c,SUM(a,b,c))

Comment: LAMBDA Math Geometry 1D3: (a,b,c)


PerimeterParallelogram

=LAMBDA(a,b,2*(a+b))

Comment: LAMBDA Math Geometry 1D4: (a,b)


PerimeterTrapezoid

=LAMBDA(a,b,c,d,SUM(a,b,c,d))

Comment: LAMBDA Math Geometry 1D4: (a,b,c,d)


PerimeterRectangle

=LAMBDA(length,width,2*(length+width))

Comment: LAMBDA Math Geometry 1D4: (length,width)


PerimeterSquare

=LAMBDA(side,4*side)

Comment: LAMBDA Math Geometry 1D4: (side)


AreaCircle

=LAMBDA(radius,PI()*radius^2)

Comment: LAMBDA Math Geometry 2DA1: (radius)


AreaTriangle

=LAMBDA(base,height,base*height/2)

Comment: LAMBDA Math Geometry 2DA3: (base,height)


AreaParallelogram

=LAMBDA(base,height,base*height)

Comment: LAMBDA Math Geometry 2DA4: (base,height)


AreaTrapezoid

=LAMBDA(height,base1,base2,height*(base1+base2)/2)

Comment: LAMBDA Math Geometry 2DA4: (height,base1,base2)


AreaRectangle

=LAMBDA(length,width,length*width)

Comment: LAMBDA Math Geometry 2DA4: (length,width)


AreaSquare

=LAMBDA(side,side^2)

Comment: LAMBDA Math Geometry 2DA4: (side)


SurfaceSphere

=LAMBDA(radius,4*PI()*radius^2)

Comment: LAMBDA Math Geometry 2DS1: (radius)


SurfaceCylinder

=LAMBDA(radius,height,2*PI()*(radius^2+radius*height))

Comment: LAMBDA Math Geometry 2DS2: (radius,height)


SurfaceCone

=LAMBDA(radius,slant,PI()*radius*(radius+slant))

Comment: LAMBDA Math Geometry 2DS2: (radius,slant)


SurfaceSquareBasedPyramid

=LAMBDA(side,slant,side*(side+2*slant))

Comment: LAMBDA Math Geometry 2DS5: (side,slant)


SurfaceRectangularPrism

=LAMBDA(length,width,height,2*(length*width+(length+width)*height))

Comment: LAMBDA Math Geometry 2DS6: (length,width,height)


VolumeSphere

=LAMBDA(radius,4*PI()*radius^3/3)

Comment: LAMBDA Math Geometry 3D1: (radius)


VolumeCone

=LAMBDA(radius,height,PI()*radius^2*height/3)

Comment: LAMBDA Math Geometry 3D2: (radius,height)


VolumeCylinder

=LAMBDA(radius,height,PI()*radius^2*height)

LAMBDA Math Geometry 3D2: (radius,height)


VolumeSquareBasedPyramid

=LAMBDA(side,height,(side^2)*height/3)

Comment: LAMBDA Math Geometry 3D5: (side,height)


VolumeRectangularPrism

=LAMBDA(length,width,height,PRODUCT(length,width,height))

Comment: LAMBDA Math Geometry 3D6: (length,width,height)

24 views0 comments

Recent Posts

See All

Comments


bottom of page