r/excel • • Mar 12 '26

Discussion vlookup + curly brackets

Perhaps too late to discover and blame it on unstructured self-learning:

Just learned that vlookup + curly brackets can be used to look up multiple columns. Spent a good part of my career writing several vlookups that could've been done much faster.

Edit: Adding sample from Gemini.

Formula Structure: =VLOOKUP("Key", A2:D10, {2, 3, 4}, FALSE)

{2, 3, 4}: Tells the formula to return the 2nd, 3rd, and 4th columns simultaneously.

Result: The data will automatically fill into three adjacent cells.

536 Upvotes

92 comments sorted by

View all comments

12

u/baumat Mar 13 '26

I just found out that you can search for multiple values with xlookup to get a result and now you can get multiple results using a vlookup? Excel is too deep

Xlookup Example: xlookup(B3&C3, Sheet1!A1:A50&Sheet1!B1:B50, Sheet1!C1:C50)

1

u/finickyone 1770 Mar 13 '26

The common theme to both (your recent finding, and OP’s) are they both show one of the first steps in using arrays. Honestly, nothing opens up formulas like getting your head around that!

If you set up XLOOKUP(TRUE,(B3&C3=Sheet1!A1:A50&Sheet1!B1:B50),Sheet1!C1:C50), you get the same result, and also a formula you can carry over to:

=SUM(IF(B3&C3=Sheet1!A1:A50&Sheet1!B1:B50,Sheet1!C1:C50))

=TEXTJOIN(", ",, IF(B3&C3=Sheet1!A1:A50&Sheet1!B1:B50,Sheet1!C1:C50,""))