rows.com

Master partial-match lookups in spreadsheets with a simple formula tweak.

If you're looking to find the row number of a code that starts with specific characters, such as "ALB," you're on the right track with functions like MATCH and LEFT.

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

There's a quiet kind of frustration that builds when you know exactly what you want a spreadsheet to do, but the formula just won't cooperate. The user who asked this question isn't struggling with a lack of effort, they're wrestling with a common conceptual gap. They want to find a row number based on the first few characters of a code, and they've already tried combining MATCH and LEFT. That's the right instinct. The problem isn't the tools; it's the way they're being asked to work together.

Here's what's happening under the surface. MATCH is built to look for an exact match by default. When you feed it a value, it expects to find that value, not something resembling it. LEFT, on the other hand, extracts characters from the beginning of a text string. So the solution is to make MATCH evaluate a transformed version of your data, one where each cell has been reduced to its first three characters. You do that by nesting LEFT inside MATCH as an array operation. In Excel, that often means entering the formula with Ctrl+Shift+Enter, or using SUMPRODUCT to avoid array entry. The formula would look something like: =MATCH(TRUE, LEFT(A1:A100,3)="ALB",0). That's the whole trick. You're not asking MATCH to ignore the rest of the code; you're changing what it sees.

What matters here is not the specific keystrokes, it's the shift in mindset. This is a perfect example of how spreadsheets reward a little bit of creative thinking. Most users hit a wall because they treat formulas as rigid commands rather than flexible building blocks. But once you realize that MATCH can work with a calculated result instead of a raw cell value, a whole category of problems opens up. You're no longer stuck with exact matches. You can search by prefix, by suffix, by pattern, or by any transformation you can dream up. That's not a niche trick; that's a fundamental unlock.

So if you're the one staring at a column of codes, feeling that familiar pinch of "I know it's possible but I can't make it work," take a breath. You're closer than you think. The formula you need is within reach, and once you see how LEFT and MATCH fit together, you'll start spotting a dozen other places where the same logic applies. It's not about memorizing one solution. It's about understanding that the function you already know can be repurposed to see your data differently. That's the real takeaway here. And the next time you're stuck, remember: the answer isn't a new tool. It's a new way to look at the one you already have.

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

Lets say I have a list of codes in a column, I want to find the row number of the code that star with ALB, for example.

I tried to use MATCH and LEFT but im not sure how to make the fuction MATCH just check the first few characters, instead of the exact value.

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