Excel xlookup with examples -Part 4 | Data Analytics Courses Online

Page 1

Understanding XLOOKUP with Examples (Part 4)

$

$

FOUNDER


What is XLOOKUP?

RECAP

• XLOOKUP is newly introduced function in MS Office 365 • It can be used in place of - VLOOKUP - HLOOKUP - Index and Match

• It is currently not available in older versions of MS Excel

Email: Support@skillfinlearning.com

Mobile: 9650010925


Advantages of using XLOOKUP

Focus of this document

• Lookups both vertical and horizontal ranges • XLOOKUP does not break when we insert new rows and columns to the data set • XLOOKUP can help you get the values both from the left as well as the right of the lookup range (better than VLOOKUP). It can help you get values from the Cells above as well as below the lookup range (better than HLOOKUP). • It can help you find the first as well as last occurrence of a value. • It does an exact match by default but can also find the nearest number if the exact match is not found • It also helps in error handling in case the lookup value is not present in the data source • It can return value for a range of cells (as done by INDEX function) • It also supports wildcards for partial matches • In our last 3 presentations, we discussed the first 6 advantages of using XLOOKUP function. • This document focusses on the last two advantages (highlighted above) of using XLOOKUP Email: Support@skillfinlearning.com

Mobile: 9650010925


Example 1 - XLOOKUP CAN RETURN VALUE FOR A RANGE OF CELLS (1/4) This is a very important advantage of using the XLOOKUP function. This feature can help us calculate results for large data sets quite easily. We have daily Sales figures of XYZ Limited from 1st Jan 2016 to 29th May 2020. The Data extends till row 1088.

We want to calculate total sales of the Company for the selected period (in the dropdown).

Can we do it with one formula? Email: Support@skillfinlearning.com

Mobile: 9650010925


Example 1 - XLOOKUP CAN RETURN VALUE FOR A RANGE OF CELLS (2/4) YES, We can calculate the total sales for selected period easily by using the XLOOKUP Function. Go to Formulas, Select Lookup & Reference and then Select XLOOKUP.

Lookup_value is the Start Date. Link it to “Cell F7”

` `

Lookup_array is the Date Range in the second table (B6:B1088)

• • Email: Support@skillfinlearning.com

Mobile: 9650010925

Return_array is the Daily Sales (C6:C1088)

Fix the ranges B6:B1088 and C6:C1088 using F4 function key. Leave other function arguments blank and then press OK.


Example 1 - XLOOKUP CAN RETURN VALUE FOR A RANGE OF CELLS (3/4) •

You get the following output

• • •

To get the result of the full range, Press F2 and start editing the formula. Add a Colon (:) as we normally type for a range in excel. Then extend the formula for the END DATE. Type X LOOKUP(LOOKUP_VALUE,LOOKUP_ARRAY,RETURN_ARRAY)

Lookup_value is the End Date. Link it to “Cell G7”

Lookup_array is the Date Range in the second table (B6:B1088)

Return_array is the Daily Sales (C6:C1088)

The Output 261.9 is the sales for 2nd April 2018 (ie; start date). •

Email: Support@skillfinlearning.com

Fix the ranges B6:B1088 and C6:C1088 using F4 function key.

Mobile: 9650010925


Example 1 - XLOOKUP CAN RETURN VALUE FOR A RANGE OF CELLS (4/4) You get the following output

NOW Since we want to get the total sales during the select period type SUM and ( at the start and ) at the end of the formula = SUM(XLOOKUP():XLOOKUP()) – SEE FULL FORMULA BELOW

=SUM(XLOOKUP(F7,$B$6:$B$1088,$C$6:$C$1088):XLOOK UP(G7,$B$6:$B$1088,$C$6:$C$1088))

You can select the range and check the total at the bottom of the window (as shown below).

With this feature, XLOOKUP can be used quite effectively in financial models and complex data analysis. Email: Support@skillfinlearning.com

Mobile: 9650010925


Example 2 - SUPPORTS WILD CARDS FOR PARTIAL MATCHES (1/5) Here is the data set showing employee ID, Name and their Annual salary.

We have the last name of the employee and we want to pull the full name and Annual salary from the database.

Is it possible?

Email: Support@skillfinlearning.com

Mobile: 9650010925


Example 2 - SUPPORTS WILD CARDS FOR PARTIAL MATCHES (2/5) We can use Wild Card Feature for Partial Mismatches in XLOOKUP Function. Go to Formulas, Select Lookup & Reference and then Select XLOOKUP.

Lookup_value is the Last Name. Link it to “Cell G7”

` `

Lookup_array is the Range (C6:C17)

Return_array is again the same Range (C6:C17)

Fix the ranges C6:C17 (both instance) using F4 function key. Leave other function arguments blank and press OK.

Email: Support@skillfinlearning.com

Mobile: 9650010925


Example 2 - SUPPORTS WILD CARDS FOR PARTIAL MATCHES (3/5)

• You get an error

• This is because now XLOOKUP is using an Exact Match now.

Email: Support@skillfinlearning.com

• To use Wild Card/ Partial mismatch, type an asterisk (*) within inverted Commas like this “*” in the XLOOKUP function formula before the lookup value. • We also need to use the fifth argument here which is the “Match Mode” where we will use 2 for the Wild Card character match.

Mobile: 9650010925


Example 2 - SUPPORTS WILD CARDS FOR PARTIAL MATCHES (4/5) Here is the formula.

Now edit the formula like this Lookup_value - Type “*” &Link it to “Cell G7”. In case we remember only the middle name then we should type “*”&Cell reference&“*”

` `

Return_array is again the same Range (C6:C17)

` `

You get the following output

If_Not_Found leave blank Lookup_array is the Range (C6:C17)

• •

Match mode:- Type 2 for wild card character match.

Fix the ranges C6:C17 (both instance) using F4 function key. Press OK.

Email: Support@skillfinlearning.com

Mobile: 9650010925

` `


Example 2 - SUPPORTS WILD CARDS FOR PARTIAL MATCHES (5/5) • Now you can use the XLOOKUP function to the Full Employee Name or again use the Wild Card match to pull the Annual Salary. • Here I am using the Full Employee Name to pull the salary (as we discussed in our previous examples).

You get the following output

This is how we can use wild card/partial match option to pull data from large databases. This was not possible using VLOOKUP or index/match or Offset functions earlier. Email: Support@skillfinlearning.com

Mobile: 9650010925


Explore our Data Analysts Skills Training (DAST) in Excel Go from beginner to an Expert in Data analytics Skills in Excel. Join this program to build your Excel analytical skill quickly through hands on project Includes:  Annual (1 year) access  Take the program anytime anywhere  Direct access to the instructor  Weekly mentorship assistance  6.5 hours on-demand HD videos  20+ real life case illustrations  5 Practice assignment  Access on Mobile and Tablet  Certificate of Completion  30-day money back guarantee

Email: Support@skillfinlearning.com

You get a Personalized Training Experience:  Unlimited access to video content  1 on 1 coaching from expert instructor  Individual mentorship assistance  Dedicated doubts resolution sessions  Practice on real world projects from industry experts  Evaluation and feedback on assignments For more details please visit; Data Analyst Skills Training in Excel (DAST)

Mobile: 9650010925


Explore our “Financial Analysts Skills Training” (FAST) course Master the complete financial analytics and Excel modeling skills to get trained as a Financial analyst by an Expert instructor Includes:  Annual (1 year) access  Take the program anytime anywhere  Direct access to the instructor  Weekly mentorship assistance  10 hours on-demand HD videos  7 real life case illustrations  7 Practice assignment  Access on Mobile and Tablet  Certificate of Completion  30-day money back guarantee

Email: Support@skillfinlearning.com

You get a Personalized Training Experience:  Unlimited access to video content  1 on 1 coaching from expert instructor  Individual mentorship assistance  Dedicated doubts resolution sessions  Practice on real world projects from industry experts  Evaluation and feedback on assignments For more details please visit; Financial Analyst Skills Training (FAST)

Mobile: 9650010925


THANK YOU

Email: Support@skillfinlearning.com

Mobile: 9650010925


Visit us: www.skillfinlearning.com Chat with us: +91 96500 10925 Email us: support@skillfinlearning.com


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.