Combining multiple arrays into a single lookup array

If we have to look up items in tables where we can’t use unique identifiers (there are no names located in a table column that contains data in all of the rows, and that data is non-repeating), we will probably have to resort to matching multiple criteria in multiple columns. This approach is described in this article. However, in modern versions of Excel supporting dynamic array formulas, we can also use a much simpler approach – we can combine multiple

How to return values adjacent to the looked-up values

In general, a lookup function such as the XLOOKUP function searches a corresponding range or an array for a match and returns the matching item from a range or array. If our data is structured in a way that we can’t search for a match in a corresponding array (but the data still is structured), a typical lookup function will not be able to help us. However, the INDEX MATCH combination still can.   Remember, the INDEX function returns the

Calendar

Dynamic Calendar Template for Excel is now available for download: dailyexcel.net calendar   dailyexcel.net calendar currently supports 10 scenarios/countries for years from 2024 to 2028:   No single workday rule, as well as three additional from-to periods, are available for collective vacation planning. Hours worked in a week, as well as holiday and vacation hours, are automatically calculated in order to support planning of business days. For supported scenarios, holidays are automatically downloaded via connection to the dailyexcel.net site:  

Generate lists of working and non-working days

You will sometimes need to generate a sequence of working and/or non-working dates in Excel. In principle, the simplest way to accomplish this is to combine the SEQUENCE function with the FILTER function.   The SEQUENCE function generates a list of sequential numbers. The SEQUENCE function syntax is as follows: =SEQUENCE ( rows ; [columns] ; [start] ; [step] ) Rows specifies the number of rows to fill. Columns specifies the number of columns to fill. If omitted, 1 column

How to use the INDIRECT function to define function arrays

In Excel, we can use the INDIRECT function to define arrays that are arguments for other functions, provided that those arrays are referencing the current workbook.   Consider the following example: We want to retrieve values from the sheets adjacent to Sheet1, but still in the same workbook. Instead of writing a specific formula for every sheet, we will write a single formula that will link the data from all of the worksheets.   We can retrieve our data using

How to look up the next smaller item or the next larger item

The XLOOKUP function searches a range or an array for a match and returns the corresponding item from a second range or array. The syntax of the XLOOKUP function is as follows: = XLOOKUP ( lookup_value ; lookup_array ; return_array ; if_not_found ; match_mode ; search_mode ) The lookup value can be either a text or a number, inputted directly into the function or as a cell reference.   When looking up numbers, other than match type 0, exact match,

How to use less than or greater than MATCH

We can use the INDEX function to designate a cell range (array) from which we want to retrieve data and, at the same time, use the MATCH function to specify the address of a cell in that cell range (array), i.e., row and column.   The MATCH function returns the relative position of the item in the range, either a row or a column. The relative position is returned in the form of an integer number, such as 1, 2,

Combining FILTER with XLOOKUP

The FILTER function allows us to filter a range of data based on criteria defined for specified corresponding arrays. By combining FILTER with XLOOKUP, that corresponding array and/or filtering criteria can be returned from (un)related tables. We can FILTER, and in the end, SUM, values based on criteria that are not present in the table we are returning values from.   In the following example, we will show how to use XLOOKUP in order to return filtering criteria: This table

Combining FILTER with INDEX MATCH

The FILTER function allows us to filter a range of data based on criteria defined for specified corresponding arrays. By combining FILTER with INDEX MATCH, that corresponding array and/or filtering criteria can be returned from (un)related tables. We can FILTER, and in the end, SUM, values based on criteria that are not present in the table we are returning values from.   In the following example, we will show how to use INDEX MATCH in order to return filtering criteria:

SORT & SORTBY functions

Two related sorting functions, SORT and SORTBY, replicate and extend Excel AutoFilter sorting functionality in formula form. The SORT function can be used to sort the contents of a range or array based on the values in that range or array, while the SORTBY function can be used to sort the contents of a range or array based on the values in the corresponding range or array, as illustrated here: By default, these functions will return multiple values, which will