You are on page 1of 23

Navigator

SumProduct Pty Limited

Primary Developer: Liam Bastick

General Cover Notes:


Simple examples of the new XLOOKUP and XMATCH functions.
Be advised: these formulae may not work in your version of Excel.

Any queries, please e-mail: liam.bastick@sumproduct.com


Website: www.sumproduct.com
Navigator
Navigator
Error Checks: þ

1 Table of Contents

Cover
Style Guide
Model Parameters
Replacing the LOOKUP Family
New Features for XLOOKUP
XMATCH
Error Checks
Navigator
Error Checks: þ

1 Formatting of Headers / Dividers

Description Display Style Name

Sheet Title Sheet Title Sheet Title


Model Name Model Name Model Name

Header 1 Header 1 Header 1


Header 2 Header 2 Header 2
Header 3 Header 3 Header 3
Header 4 Header 4 Header 4

Notes Notes Notes

Table Heading Table Heading Table Heading

2 Individual Cell Styles

Description Display Style Name

Assumption Assumption Assumption

Constraint Constraint Constraint

Empty Empty

Error Check þ Error Check

Hyperlink Hyperlink Hyperlink

Internal Reference Unused Internal Reference

Line Calculation 77 Line Calc

Line Total 77 Line Total

Parameter 365 Parameter

Range Name Description Not_Named Range Name Description

Row Reference Row 47 Row Ref

Row Summary 77 Row Summary


Units A$ Units

WIP WIP

3 Numerical Styles

Description Display Style Name

Comma 123,456.79 Comma

Comma [0] (123,457) Comma [0]

Currency $ 123,456.79 Currency

Currency [0] $ 123,457 Currency [0]

Date 24 Sep 21 Date

Date Heading Sep 21 Date Heading

Numbers 0 (123,457) Numbers 0

Percent 50% Percent


Navigator
Error Checks: þ

1 General

Key Inputs

General
Model Name
Client Name SumProduct Pty Limited

2 General Range Names

Technical Assumptions
Days in Year 365
Months in Month 1
Months in Quarter 3
Months in Half Yr 6
Months in Year 12
Quarters in Year 4

Rounding Accuracy 5

Very Large Number 1E+99


Very Small Number 1E-08

Thousand 1000
Navigator
Error Checks: þ

1 HLOOKUP Replacement

Example

Data

Student Graham Alice Mitch Wendy Xiu


ID No. 1333 1331 1392 1867 3589

Solution

Student Xiu

XLOOKUP #NAME? {=_xlfn.xlookup(H18,J12:P12,J13:P13)}

HLOOKUP (3 args) 3589 {=HLOOKUP(H18,J12:P13,ROWS(I12:I13))}

HLOOKUP (4 args) 3589 {=HLOOKUP(H18,J12:P13,ROWS(I12:I13),0)}

ID No. 1331

XLOOKUP #NAME? {=_xlfn.xlookup(H27,J13:P13,J12:P12)}

HLOOKUP No thank you Ha ha

2 VLOOKUP Replacement

Example

Data

Student ID
Graham 1333
Alice 1331
Mitch 1392
Wendy 1867
Xiu 3589
Brian 2364
Toby 3717

Solution

Student Xiu
XLOOKUP #NAME? {=_xlfn.xlookup(H52,F41:F47,G41:G47)}

VLOOKUP (3 args) 3589 {=VLOOKUP(H52,F41:G47,COLUMNS(F39:G39))}

VLOOKUP (4 args) 3589 {=VLOOKUP(H52,F41:G47,COLUMNS(F39:G39),0)}

3 LOOKUP Replacement

Example

Assumptions

Year 2022 2023 2024 2025 2026+


CPI 3% 4% 5% 6% 7%

LOOKUP Solution

Year 2019 2020 2021 2022 2023 2024 2025 2026


CPI #N/A #N/A #N/A 3% 4% 5% 6% 7%

=LOOKUP(G$74,$G$67:$K$68)

XLOOKUP Solution

Year 2019 2020 2021 2022 2023 2024 2025 2026


CPI #NAME? #NAME? #NAME? #NAME? #NAME? #NAME? #NAME? #NAME?

{=_xlfn.xlookup(G$82,$G$67:$K$67,$G$68:$K$68,-1)}

LOOKUP with IF Solution

Year 2019 2020 2021 2022 2023 2024 2025 2026


CPI 3% 3% 3% 3% 4% 5% 6% 7%

=IF(G$90<$G$67,$G$68,LOOKUP(G$90,$G$67:$K$68))

4 Where LOOKUP Wins

Example

Assumptions

Numbers 1 2 3 4 5

Letters
A
B
C
D
E

Letter Chosen B

Corresponding Number

LOOKUP 2 =LOOKUP(H112,F105:F109,G102:K102)

XLOOKUP #NAME? {=_xlfn.xlookup(H112,F105:F109,G102:K102)}

XLOOKUP Correct #NAME? {=_xlfn.xlookup(H112,F105:F109,TRANSPOSE(G102:K102))}


Brian Toby
2364 3717
2027 2028
7% 7%

2027 2028
#NAME? #NAME?

2027 2028
7% 7%
Navigator
Error Checks: þ

1 Approximate Matches

Example

Data
Letter Value
A 7
B 4
C 2
D 4
E -3

Solution

Search Value 7

Match Mode
0 -1 1 2
1 #NAME? #NAME? #NAME? #NAME? {=_xlfn.xlookup($G$21,$I$12:$I$16,$H
Search Mode

-1 #NAME? #NAME? #NAME? #NAME?


2 #NAME? #NAME? #NAME? #NAME?
-2 #NAME? #NAME? #NAME? #NAME?

2 Selecting a Vector

Example

Data

Exam Marks

Graham Alice Mitch Wendy Xiu


Maths 77% 66% 46% 44% 69%
English 53% 57% 59% 57% 47%
Physics 51% 65% 44% 55% 71%
Chemistry 68% 50% 74% 67% 61%
Biology 60% 68% 44% 66% 68%
Astrology 46% 44% 50% 63% 58%
Russian Literature 51% 45% 72% 63% 56%

Solution

Student Mitch
Subject Physics

Result #NAME? {=_xlfn.xlookup(G53,G40:G46,_xlfn.xlookup(G51,H39:N39,H40:N46))}

Alternative 44% =INDEX(H40:N46,MATCH(G53,G40:G46,0),MATCH(G51,H39:N39,0))

3 Vector Lookups

Example

Data
Q1 Q2 Q3 Q4
Graham 1,498 1,578 2,453 1,149
Alice 1,616 1,374 1,255 1,589
Mitch 1,567 1,251 1,797 1,368
Wendy 2,439 1,382 2,107 2,399
Xiu 1,063 1,427 1,436 1,942
Brian 1,250 1,786 2,309 1,195
Toby 1,211 2,491 1,611 2,059

Solution

Quarter Q2

#NAME? #NAME? {=_xlfn.xlookup(G77,I65:L65,I66:L72)}


#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?

4 Creating Mini-Ranges

Example

Data

Month Jan 21 Feb 21 Mar 21 Apr 21 May 21


Sales 1,363 9,910 12,661 3,488 7,958

Solution

Start Month Jul 19


End Month Oct 19 #NAME? Aug 19 Sep 19 Oct 19 Nov 19

Total Sales #NAME? =SUM(_xlfn.xlookup(G100,H94:S94,H95:S95):_xlfn.xlookup(G101,H94:S94,H


5 Searching from the End

Example

Data

Customer Date Payment


Alice 8 Jan 19 $ 2,460.67 #NAME?
Charlie 24 Jan 19 $ 1,862.11 #NAME?
Fred 8 Feb 19 $ 2,461.64 #NAME?
Bo 7 Mar 19 $ 1,297.89 #NAME?
Fred 21 Mar 19 $ 1,322.28 #NAME?
Eric 7 Apr 19 $ 1,404.14 #NAME?
Alice 22 Apr 19 $ 2,379.61
Fred 11 May 19 $ 2,385.94
Duane 6 Jun 19 $ 2,277.39
Alice 24 Jun 19 $ 2,467.61
Charlie 20 Jul 19 $ 1,245.61
Bo 10 Aug 19 $ 2,341.09
Duane 19 Aug 19 $ 1,836.65

Solution

Customer Alice

Date Payment
Last Payment #NAME? #NAME?

{=_xlfn.xlookup($G$130,$G$113:$G$125,H$113:H$125,,-1)}

6 Exact Matches

Example

Data

Label Amount
SumProduct 1 #NAME?
Sum Product 2 #NAME?
SumProduct 4 #NAME?
Some Product 8 #NAME?
sumproduct 16 #NAME?
sumProduct 32
SumproducT 64
SumProduct 128
Sum Product 256
Different 512

Solution

Selection Sum Product


First Match #NAME? {=_xlfn.xlookup(1,EXACT(H145:H154,G159),I145:I154)}

Last Match #NAME? {=_xlfn.xlookup(1,EXACT(H145:H154,G159),I145:I154,,-1)}

7 Wildcards

Example

Data

Item Amount
John 1
Jon 2
Jonathan 4
Jonathon 8
Johnny 16
Jonny 32

Solution

Selection J?n*n*

First Result #NAME? {=_xlfn.xlookup(G184,H174:H179,I174:I179,2)}

Last Result #NAME? {=_xlfn.xlookup(G184,H174:H179,I174:I179,2,-1)}


{=_xlfn.xlookup($G$21,$I$12:$I$16,$H$12:$H$16,G$24,$F25)}

Brian Toby
56% 50%
53% 49%
42% 53%
45% 73%
74% 70%
54% 50%
55% 67%
ookup(G51,H39:N39,H40:N46))}

G46,0),MATCH(G51,H39:N39,0))

Jun 21 Jul 21 Aug 21 Sep 21 Oct 21 Nov 21 Dec 21


4,807 6,344 12,929 3,632 4,957 2,916 1,860

Dec 19

95:S95):_xlfn.xlookup(G101,H94:S94,H95:S95))
G159),I145:I154)}

G159),I145:I154,,-1)}
Navigator
Error Checks: þ

Example

Data

Values
#DIV/0!
14
-7
6.2
9
-7
#REF!
7
1
5.2
9
4
1

Results

lookup_value -6.7
match_mode -1
search_mode -1

XMATCH 6 =_xlfn.xmatch(G30,F13:F25,G31,G32)
Navigator
Error Checks: þ

1 Error Checks

Summary of Errors

Assumptions

Unused

Summary of Errors þ

You might also like