Lambdas
Financial 10
xl.mortgage.scheduleMortgage schedule LAMBDAxl.mortgage.schedule spills month, payment, interest, principal, and balance for a fixed-rate US loan. A $1,200 six-month example is small enough to audit.xl.loan.balanceLoan balance LAMBDAxl.loan.balance returns what is left after a number of fixed monthly payments. On the $25,000 car loan at 6.9% for 60 months, the balance after 12 payments is $20,663.34.xl.commissionTiered commission LAMBDAxl.commission pays 5% up to $10,000, 7% on the next $10,000, and 10% above $20,000. Sales of $25,000 earn $1,700.xl.marginMargin LAMBDAxl.margin returns profit as a share of the selling price. A $50 price on a $30 cost is a 40% margin.xl.markupMarkup LAMBDAxl.markup returns profit as a share of the cost. A $50 price on a $30 cost is a markup of 2/3, about 66.67%.xl.cagrCAGR LAMBDAxl.cagr returns the compound annual growth rate. $1,000 growing to $1,628.894627 in 10 years is 5% a year, the same rate as RRI and the POWER page.xl.prorate.monthProrate a month LAMBDAxl.prorate.month splits a monthly amount across the inclusive days you occupied. Rent of $3,100 for January 2026, from the 15th through the 31st, is $1,700.xl.payment.splitPayment split LAMBDAxl.payment.split spills the payment, the interest, and the principal for one month. Month 1 of the $25,000 car loan at 6.9% for 60 months is $493.85, $143.75, and $350.10.xl.compound.fvCompound growth LAMBDAxl.compound.fv returns the future balance of a starting amount and a monthly deposit. $8,000 and $300 a month at 5% for 15 years is $97,096.31.xl.apyAPR to APY LAMBDAxl.apy converts an APR and a compounding count into an APY. Six percent compounded monthly is 6.1678%, and the reverse returns the APR.
Text 13
xl.number.wordsNumber to words LAMBDAxl.number.words spells a US dollar amount under $1,000,000. 1234.56 becomes one thousand two hundred thirty-four dollars and fifty-six cents.xl.format.phoneFormat phone LAMBDAxl.format.phone turns ten digits into (512) 555-0148. A leading US country code 1 is dropped. Anything else is returned unchanged.xl.split.nameSplit name LAMBDAxl.split.name returns the first word and the rest of a personal name. Maria Lopez becomes Maria and Lopez. Maria Elena Lopez keeps Elena with the last name.xl.text.betweenText between LAMBDAxl.text.between returns the characters between two markers. The order number in Order #10428, Austin is 10428.xl.digits.onlyDigits only LAMBDAxl.digits.only keeps the digits in a string. 512-555-0148 becomes 5125550148, still as text so a leading zero can survive.xl.proper.nameProper name LAMBDAxl.proper.name applies title case and capitalizes the letter after Mc. mcdonald becomes McDonald. PROPER alone returns Mcdonald.xl.initialsInitials LAMBDAxl.initials returns the uppercase first letter of each word. Maria Elena Lopez becomes MEL.xl.count.wordsCount words LAMBDAxl.count.words counts words after trimming. Maria Elena Lopez is 3. A blank cell is 0.xl.pad.zipPad ZIP LAMBDAxl.pad.zip returns a 5-digit US ZIP as text. The number 2134 becomes 02134, with the leading zero restored.xl.ordinalOrdinal LAMBDAxl.ordinal turns 1, 2, 3, and 4 into 1st, 2nd, 3rd, and 4th. 11, 12, and 13 stay 11th, 12th, and 13th. 21 is 21st.xl.last.wordLast word LAMBDAxl.last.word returns the text after the last space. Maria Elena Lopez returns Lopez. A single word is returned unchanged.xl.collapse.spaceCollapse spaces LAMBDAxl.collapse.space turns nonbreaking spaces into ordinary spaces and trims the result. A padded city becomes Austin.xl.first.wordFirst word LAMBDAxl.first.word returns the text before the first space. Maria Elena Lopez returns Maria. A single word is returned unchanged.
Tax 6
xl.sales_taxSales tax LAMBDAxl.sales_tax rounds a price times a rate you supply to the cent. $120 at 6.25% is $7.50. $49 at 8.25% is $4.04.xl.federal.tax2026 federal income tax LAMBDAxl.federal.tax estimates 2026 ordinary income tax for a single filer who takes the $16,100 standard deduction. $80,000 of wages is $8,770 of tax.xl.fica2026 employee FICA LAMBDAxl.fica estimates 2026 employee Social Security and Medicare tax. On $80,000 of wages the employee share is $6,120. The Social Security wage base is $184,500.xl.se.tax2026 self-employment tax LAMBDAxl.se.tax estimates 2026 self-employment tax. $80,000 of Schedule C profit with no W-2 wages is $11,303.64. The wage base is $184,500.xl.macrsMACRS depreciation LAMBDAxl.macrs returns one year of GDS depreciation. On a $10,000 five-year asset, year 1 is $2,000, the Publication 946 half-year rate.xl.mileage.deductionStandard mileage deduction LAMBDAxl.mileage.deduction multiplies miles by the IRS standard mileage rate for the trip date. Twenty business miles on June 12, 2026 is $14.50.
Date and time 9
xl.nth.weekdayNth weekday LAMBDAxl.nth.weekday returns the nth weekday of a month. The fourth Thursday of November 2026 is November 26, Thanksgiving.xl.age.ymdAge in years, months, and days LAMBDAxl.age.ymd returns completed years, months, and days. Someone born March 15, 1990 is 36 years, 7 months, and 27 days old on November 11, 2026.xl.quarter.endQuarter end LAMBDAxl.quarter.end returns the last calendar day of the quarter. July 4, 2026 is in the third quarter, which ends on September 30, 2026.xl.week.startWeek start LAMBDAxl.week.start returns the Monday of the week containing a date. July 4, 2026 is a Saturday, so the week starts on Monday, June 29, 2026.xl.month.startMonth start LAMBDAxl.month.start returns the first of the month. July 4, 2026 becomes July 1, 2026.xl.overlap.daysOverlap days LAMBDAxl.overlap.days counts the inclusive days shared by two ranges. January 1–10 and January 8–15, 2026 share January 8, 9, and 10, which is 3 days.xl.sequence.monthsMonth sequence LAMBDAxl.sequence.months spills the first day of each month. Three months from July 4, 2026 are July 1, August 1, and September 1.xl.us.holidayUS holiday LAMBDAxl.us.holiday returns a federal holiday's calendar date. Thanksgiving 2026, the fourth Thursday of November, is November 26. A Saturday holiday is not moved to Friday.xl.business.daysBusiness days LAMBDAxl.business.days counts weekdays between two dates and skips US federal holidays. January 5 through January 30, 2026 is 19 business days.
Statistical 4
xl.weighted.averageWeighted average LAMBDAxl.weighted.average divides the sum of value times weight by the sum of the weights. Scores of 90 and 80 weighted 40 and 60 average 84.xl.z.scoreZ-score LAMBDAxl.z.score measures a value in sample standard deviations from the mean. January's $143.60 utility bill is about 1.2855 standard deviations above the four-bill average.xl.text.modeText mode LAMBDAxl.text.mode returns the text that appears most often. In Yes, No, Yes, Yes the mode is Yes. MODE.SNGL only does this for numbers.xl.count.uniqueCount unique LAMBDAxl.count.unique counts distinct values and ignores blanks. Austin, Dallas, Austin, Houston counts as 3.
HR and payroll 1
xl.overtime.payOvertime pay LAMBDAxl.overtime.pay pays the first 40 hours at the straight rate and later hours at time and a half. 46 hours at $20 is $980.
Lookup 2
xl.two.wayTwo-way lookup LAMBDAxl.two.way returns the cell where a row label and a column label meet. Dallas in 2026 is 22 on the sample grid.xl.coalesceCoalesce LAMBDAxl.coalesce returns the first value that is not blank. Two empty cells and then Austin return Austin.
Dynamic arrays 5
xl.fill.downFill down LAMBDAxl.fill.down copies the last non-blank value through the blanks under it. Austin, a blank, a blank, Dallas becomes Austin, Austin, Austin, Dallas.xl.running.totalRunning total LAMBDAxl.running.total spills a running sum. The four utility bills accumulate to $143.60, $239.80, $358.25, and $446.35.xl.group.sumGroup sum LAMBDAxl.group.sum spills each distinct key and the sum of its values. Austin 10 and Austin 5, plus Dallas 20, come back as Austin 15 and Dallas 20.xl.unpivotUnpivot LAMBDAxl.unpivot turns a crosstab into rows of row label, column label, and value. Austin and Dallas across 2024 and 2025 become four rows.xl.sort.uniqueSort unique LAMBDAxl.sort.unique spills the distinct values in ascending order. Austin, Dallas, Austin, Houston comes back as Austin, Dallas, Houston.
Validation 5
xl.luhnLuhn check LAMBDAxl.luhn returns TRUE when a card number passes the Luhn checksum. The test number 4111111111111111 passes. Change the last digit to 2 and it fails.xl.is.emailEmail shape LAMBDAxl.is.email returns TRUE for a simple address: one @, text before it, and a dot in the domain. maria.lopez@example.com is TRUE. It is not a full internet-address check.xl.is.zipZIP shape LAMBDAxl.is.zip returns TRUE for a 5-digit ZIP or a ZIP+4. 78701 and 78701-1234 pass. 7870 does not.xl.is.stateState abbreviation LAMBDAxl.is.state returns TRUE for a US state or DC abbreviation. TX and tx pass. Texas does not.xl.betweenBetween LAMBDAxl.between returns TRUE when a value is between two ends, including the ends. 5 is between 1 and 10. 10 is between 1 and 10. 11 is not.
Math 1
xl.percent.changePercent change LAMBDAxl.percent.change returns the change from an old number to a new one. 100 growing to 125 is 25%. A zero base is #N/A, not a huge percent.