Skip to content

Instantly share code, notes, and snippets.

@timruffles
Last active January 25, 2022 11:24
Show Gist options
  • Save timruffles/8e862862e873ccbeb291 to your computer and use it in GitHub Desktop.
Save timruffles/8e862862e873ccbeb291 to your computer and use it in GitHub Desktop.
google sheets - uk stamp duty calculator, new rate (2015)
// put this into a cell and then name a range 'housePrice'
=MIN(MAX(0,housePrice-250000),250000-125000)*0.02 + MIN(MAX(0,housePrice - 250000), 925000-250000) * 0.05 + MIN(MAX(0,housePrice - 9250000), 1500000-925000) * 0.1
@robllewellyn
Copy link

robllewellyn commented Oct 1, 2021

This is very helpful, thank you. Question if I may?
My sheet shows the purchase price of the property as a negative number EG (1,000,000) , that allows me to work out costs and income for a project, costs be negative numbers, is there a way to flip the formula, as this show 0 against a negative number (of course). Works brilliantly for positive number!

Im currently thinking to use ABS() to convert a negative to a positive and then bringing it back again. But feels a bit...heavy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment