Automate rate matching by merging tables on date ranges

Are you seeking an efficient way to merge data in Power Query to match billed hours with charged amounts?

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

This is exactly the kind of problem that reveals how brittle traditional spreadsheets have become. A user on Reddit is manually writing conditional columns every time an hourly rate changes, stitching together two tables by date ranges. It works, but it breaks the moment anything shifts. The real issue isn't the formula, it's the assumption that your tools should require manual intervention for what is fundamentally a lookup problem. We think the solution isn't a better conditional column; it's a smarter data model.

What this user is describing, matching hours billed to a rate that changes over time, is a classic merge on date ranges. One table has daily entries; another has rate periods. The challenge is that standard spreadsheet lookups, like VLOOKUP or INDEX/MATCH, expect exact matches or approximate matches on a single value. They don't naturally handle "find the rate that was active on this date." So users resort to nested IFs or hardcoded thresholds. That works once. It fails when rates change quarterly, monthly, or unpredictably. The user is right to be frustrated: they're doing the work, but the tool isn't doing the thinking.

This is where an AI-native spreadsheet approach changes the game. Instead of writing conditional logic that must be updated manually, you can define a relationship between the two tables: "for each date, find the rate whose 'from date' is the most recent before or on that date." That's a single, declarative operation. The system handles the rest. When a new rate is added, the merge updates automatically. No rewriting formulas. No risk of forgetting to update a threshold. The user's time shifts from maintenance to analysis. That's the transformation we care about, not faster typing, but smarter structure.

So here is our plain opinion: If you are still manually editing conditional columns to handle rate changes, you are solving the wrong problem. The right move is to explore tools that let you merge tables on date ranges as a first-class operation. Whether that's Power Query, a modern spreadsheet with AI capabilities, or a dedicated data tool, the principle is the same, let the logic be reusable and self-updating. The user who posted this is already halfway there: they recognize the pain. The next step is to stop patching the old method and start using a system that treats time-varying rates as a natural data relationship, not a manual chore.

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

I need help! I'm trying to find a way to match the hours billed to the amount charged. If one table has columns (date, hours), and another table has (hourly rate, from date), how would I get a table that list (date, hours, hourly rate). Right now I write a conditional column, but I don't want to have to manually edit the query every time the rate changes. Thanks

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