rows.com

Find any price instantly by inputting width and length together

Navigating price lists can be frustrating, especially when you need to find the right price based on specific dimensions like width and length.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is a smarter request than most people realize, and it deserves a smarter answer. The user who posted this, a salesperson wrestling with a pricelist, is asking whether two XLOOKUP formulas can be merged so that a single input of width *and* length returns the correct price from a table. The answer is yes, and the solution is simpler than the confusion around it suggests.

What this person has done is correctly identify the problem: existing spreadsheet tools force you to choose between searching by row or by column, but a price table is a two-dimensional grid. You need both coordinates to land on the right cell. The two formulas they shared already work independently, one finds the price when width is the variable and length is fixed, the other flips the roles. The missing piece is a single INDEX/MATCH combination that treats both inputs as variables at the same time. Specifically, `=INDEX(C16:T27, MATCH(Z17, B16:B27, 1), MATCH(Y17, C15:T15, 1))` will return the cell where the row matches the width input and the column matches the length input, using approximate match (the `1`) to handle measurements that fall between listed values.

For a salesperson on the floor, this is not a technical curiosity, it is a time-saver that removes friction from every quote. Instead of hunting through a table or running two separate lookups, they type the width in one cell, the length in another, and the price appears instantly. The formula is transparent enough that anyone comfortable with XLOOKUP can adapt it, and it works with the existing table structure they already have. No macros, no add-ins, no restructuring of the pricelist.

The practical takeaway is this: you do not need to combine two XLOOKUPs because you should not be using XLOOKUP for a two-axis lookup at all. INDEX/MATCH is the right tool here, and it has been for decades. The spreadsheet industry has done a poor job of teaching this, leaving users to stitch together workarounds. But the fix is one formula, not a rewrite of your workflow. Input width, input length, get price. That is the whole point.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is for a pricelist and the idea is for a salesperson can input a measurement for width and length and the price cell of the intersecting width and length to display:

Row (Width) × Column (Length)=Table body is price

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community