Discussion
I'm trying to do a formula that I thought was called banded and stepped. But I can't find it on google.
Basically I want to calculate something in a similar way to ebay charges.
For example... Less than 500 at 5%, 501 - 1000 at 7%, 1001 - 5000 at 9%.
So if an item was £1500 the first £500 should be at 5%, the next 500 at 7% and the next at 9%.
I'm sure there is a google page to help, but I don't have the vocabulary to even do a search! Any help appreciated.
Thanks
Basically I want to calculate something in a similar way to ebay charges.
For example... Less than 500 at 5%, 501 - 1000 at 7%, 1001 - 5000 at 9%.
So if an item was £1500 the first £500 should be at 5%, the next 500 at 7% and the next at 9%.
I'm sure there is a google page to help, but I don't have the vocabulary to even do a search! Any help appreciated.
Thanks
=SUMPRODUCT is what you are looking for.
So =SUMPRODUCT(--(A1>{0,500,1000}),A1-{0,500,1000},{0.05,0.02,0.02})
Then just keep on adding bands to (0,500,1000, 5000) and the percentage change each step (0.05, 0.02, 0.02, 0.02) etc
Stick it all in a range if it helps, but the above shows the longhand.
So =SUMPRODUCT(--(A1>{0,500,1000}),A1-{0,500,1000},{0.05,0.02,0.02})
Then just keep on adding bands to (0,500,1000, 5000) and the percentage change each step (0.05, 0.02, 0.02, 0.02) etc
Stick it all in a range if it helps, but the above shows the longhand.
Edited by Noger on Wednesday 29th August 09:36
Thanks for the speedy reply...
Unfortunatly, it didn't seem to work. I copied the fomula into excel, and kept the bandings the same.
Eg. 0-500 5%, 500-1000 2%, 1000+ 2%. If you work the formula on 678 you get 37.46, when you should get 28.56.
This formula =SUMPRODUCT(--(A4>{0,500,1000}),A4-{0,500,1000},{0.05,0.02,0.02})
Have I missed something here?
Unfortunatly, it didn't seem to work. I copied the fomula into excel, and kept the bandings the same.
Eg. 0-500 5%, 500-1000 2%, 1000+ 2%. If you work the formula on 678 you get 37.46, when you should get 28.56.
This formula =SUMPRODUCT(--(A4>{0,500,1000}),A4-{0,500,1000},{0.05,0.02,0.02})
Have I missed something here?
Erm.
5% of 500 = 25
7% of 178 = 12.46
£25 + £12.46 = £37.46 ?
Ah, see the problem now. The percentage figures are the difference , not the total. Hence the 5%, 2%, 2% = 5%, 7%, 9%.
So it works out the first array as (1,1,0) then the second as (500,168,-322) and the third as (0.05,0.02,0.02) then multiplies 1*500*.05 and 1*168*.02 (and 0*-322*.02) and adds them together.
5% of 500 = 25
7% of 178 = 12.46
£25 + £12.46 = £37.46 ?
Ah, see the problem now. The percentage figures are the difference , not the total. Hence the 5%, 2%, 2% = 5%, 7%, 9%.
So it works out the first array as (1,1,0) then the second as (500,168,-322) and the third as (0.05,0.02,0.02) then multiplies 1*500*.05 and 1*168*.02 (and 0*-322*.02) and adds them together.
Edited by Noger on Wednesday 29th August 13:56
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


