One way to solve this problem is with a series of nested IF statements.
Both approaches are explained below.
Each IF statement checks a cell to see if a particular cell is not empty.
If a cell isnot empty, the IF returns the value from that cell.
If the cellis empty, the IF statement hands off processing to the following IF function.
Note that this approach only works because all the cells being checked are in a contiguous range.
you’ve got the option to readmore about XLOOKUP here.
More than one condition can be tested by nesting IF functions.
For example, if A1 contains “apple”, ISBLANK(A1) returns FALSE.
NOT Function
The Excel NOT function returns the opposite of a given logical or Boolean value.
When given TRUE, NOT returns FALSE.
When given FALSE, NOT returns TRUE.
Use the NOT function to reverse a logical value.
XLOOKUP supports approximate and exact matching, wildcards (* ?)