Memuat
Memuat
Flexible XLOOKUP Search for meal plan and calories
0 views
XLOOKUP searches left or right and has a built-in fallback value. Handy for pulling a category from a price or the other way round.

Two-way lookups that do not depend on column order.
The real project file is available. It is not just the picture above: you get the working file with every formula in place. It can be downloaded after payment, and we send the download link by WhatsApp or email.
.xlsx workbook (.xlsx)
| Cell | Formula | What it does |
|---|---|---|
| H2 | =IFERROR(XLOOKUP(B2,Master!A:A,Master!B:B,0),IFERROR(INDEX(Master!B:B,MATCH(B2,Master!A:A,0)),0)) | Unit price, 0 when the item is missing. |
| I2 | =IFERROR(XLOOKUP(B2,Master!A:A,Master!C:C,"Tanpa kategori"),IFERROR(INDEX(Master!C:C,MATCH(B2,Master!A:A,0)),"Tanpa kategori")) | Category with a fallback text. |
| J2 | =IFERROR(XLOOKUP(MAX(Data!G:G),Data!G:G,Data!B:B),INDEX(Data!B:B,MATCH(MAX(Data!G:G),Data!G:G,0))) | Item with the largest transaction total. |
| J5 | =IFERROR(XLOOKUP("*"&J4&"*",Master!A:A,Master!B:B,"Tidak ada",2),IFERROR(INDEX(Master!B:B,MATCH("*"&J4&"*",Master!A:A,0)),"Tidak ada")) | Look up a price from a partial keyword in J4. |
Columns of the Data sheet:
| Meal | Calories per Serving |
|---|---|
| White Rice 100 g | 130 |
| Boiled Chicken Breast 100 g | 165 |
| Boiled Egg 1 Piece | 78 |
| Fried Tempeh 50 g | 110 |
| Steamed Tofu 100 g | 80 |
| Spinach 100 g | 23 |
| Banana 1 Piece | 105 |
| Oatmeal 40 g | 150 |
| Avocado 100 g | 160 |
| Low Fat Milk 200 ml | 90 |
The sample data is synthetic.
Yes. The picture above is only a preview. After payment we send the download link of the real project file (an .xlsx workbook) by WhatsApp or email.
No. The sample data is synthetic and only shows how the formulas behave. Replace it with your own data and the formulas keep working.
Yes, as a separate order. Message us on WhatsApp with a short description of your columns and what you want to see.
Sample data is synthetic. Excel is a trademark of Microsoft Corporation.
Back to Excel portfolio