# Introducing the New LAMBDA Function in Excel

## Another game-changer from Microsoft

Feb 8 · 9 min read

# LAMBDA Basics

=LAMBDA(parameter_or_calculation, …

# Part 1 — Simple Examples

## Example 1

=LAMBDA(x,y,x+y)(5,3)

## Example 2

=LAMBDA(FirstName,LastName,FirstName&" "&LastName
)(G17:G21,H17:H21)

## Example 3

=LAMBDA(FirstName,LastName,
LOWER(FirstName&"."&LastName&"@email.com")
)(G27:G31,H27:H31)

# Part 2—Filter Table Based on User Selection

## Example 4

=LAMBDA(Player,SORT(CHOOSE({1,2,3},Player,INDEX(Table1[Fee],SEQUENCE(ROWS(Player),,XMATCH(INDEX(Player,1),Table1[Player]))),
INDEX(Table1[Year],SEQUENCE(ROWS(Player),,XMATCH(INDEX(Player,1),Table1[Player])))
),{2,3},-1,-1))(I16:I18)
INDEX(TransfersTable[Fee/Year],SEQUENCE(ROWS(Player),,
XMATCH(INDEX(Player,1),TransfersTable[Player]))),

# Part 3—Recursion

## Example 5

=LAMBDA(ClubName,ExcludeCharacters,IF(ExcludeCharacters="",ClubName,CleanName(SUBSTITUTE(ClubName,LEFT(ExcludeCharacters,1),""),
RIGHT(ExcludeCharacters,LEN(ExcludeCharacters)-1))
))(G14:G23,\$G\$11)

## Example 6

=LAMBDA(NumberGroup,
SUM(--MID(NumberGroup,SEQUENCE(LEN(NumberGroup)),1))
)(G30)

# Final Words

## CodeX

Everything connected with Tech & Code

Written by

## Andrew Moss

I mainly focus on Excel-related content in my articles, often providing example workbooks to download, too. https://www.linkedin.com/in/andrewcharlesmoss

## CodeX

Everything connected with Tech & Code

Written by

## Andrew Moss

I mainly focus on Excel-related content in my articles, often providing example workbooks to download, too. https://www.linkedin.com/in/andrewcharlesmoss

## CodeX

Everything connected with Tech & Code

## Redshift ML: a modern connection between SQL and ML

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app