This brought back memories! Really happy to have left all that excel madness behind.
The vlookup is not taking the nearest, but the one that matches the closest without surpassing it. So In your example, the values from the row $=1,282 are taken even if 2,596 would be nearer.
So with this in mind, this is the formula I came up with
[Scale 2].Filter(
[$]<=WeeklyEarnings.Round(0) #Get all the items in Scale 2 <= to your weekly earnings
).Sort(
false,[Scale 2].[$] #Sort according to `$` from bigger to smaller
).First().Let(row, #store the row where `$` is biggest in the variable `row`
round((WeeklyEarnings.Round(0)+0.99)*row.a-row.b,0) #the actual formula from your excel
)
Here you have the actual doc in action, it should behave exactly like your excel.