How to sum a value when there is a variable rate with a variable value. Example: 0 to 400 the rate is 0.02314, then their is 400 to 500 the rate is 0.03333, and lastly there is 500 to 600 and the rate is 0.04569. I am a newbie at Excel so please be kind and explain the answer is simple terms. Thanks
Hi John,
Can you please supply an example file with some data, showing what it is you want as a result.
I'm having trouble understanding exactly what it is you are trying to do.
Regards
Phil
There are a couple of ways to go about this, a nested IF or IFS, but I would recommend a VLOOKUP. You would simply put the formula =VLOOKUP(value,tblLookup,2,TRUE), where "value" is the value you want to find the rate for, and "tblLookup" is a separate table you created with the low end of your rates (0,400,500), the most important this is the "TRUE" which finds an approximate match. What that means is it will go down the list and find where the value is higher than your value and jump back down and use that rate. For example, if you have a value of 304, VLOOKUP will go down your lookup table find 400 and jump back down to 0 and use a rate of 0.02314.
I hope I'm making sense, find an example attached. 🙂
Phil, thank you for replying. I will now attach a super simple workbook. If you look at the TEMPLATE sheet you will see that there is a 3 tier calculation of how they will charge me for my electric bill. Tier 1 is at the lowest rate and it goes up from there. Tier one level is 0 to 400 and T2 is 400 to 500 and T3 is 500 up. I am trying to calculate in the spreadsheet what the dollar amount will come to. See attachment. Remember I am not very well versed in using Excel. Worse than a novice. I make spreadsheets out of necessity.
Hi John,
Is this resolved?
Jessica's answer is marked as the solution, but you've then added another reply and attached a file?
Phil
Thanks Phil was just replying to your request.
Phil, had a chance to work with the sheet that J. Stewart supplied and it does not work. Please look at my attached file and look to see what I need, please. Thank you
Hi John,
Jessica's approach is the way to go. Because you have a rate that changes based on (presumably) the Kwh you use, you can use VLOOKUP to get the rate that is chargeable for each amount of Used Kwh.
In the attached workbook I've added a sheet called Example and added in the VLOOKUP formula into the Daily Cost column. The VLOOKUP uses cells on your Template sheet to lookup the data it needs - I've colored these yellow.
You'll see for the last 2 dates, where it's used 420 and 521 Kwh, the rate being charged is correct for that usage. For all other amounts of Used Kwh, it's working out the cost for Tier 1 because all amounts are below 100.
If you are not familiar with VLOOKUP this article explains how VLOOKUP works.
Regards
Phil
Phil, thank you for the file. I will work with it and see if that works out. Much appreciated for the time you spent on helping me. Will let you know how it goes.
Phil just want to let you know that I have tried to adapt you file you supplied me and made some adjustment. I have attached my new file in which I used the suggested formulas. Seems to work great. Can't thank you and Jessica enough. I will continue to modify the file as need. And I just want to tell Jessica Stewart that it just took me a little bit longer with a few more trial and error steps to figure out just what you were telling me and how the formulas work. Still having a struggle to modify the Vllookup to work to my advantage. I will keep at it. Takes me just a little longer to learn. I am not the sharpest tool in the shed when it comes to using Excel.
A big shout out to Jessica Stewart, THANK YOU.
I have attached my new workbook for all to see. I am not a pro and it may seem lame, but it works for me.
Hi John,
Well done getting it working. It's all about keeping at it and learning, whatever your pace.
If you get stuck then you can search through all of our blog posts to se if there's an article that explains what you need.
Or you can post a new question here.
regards
Phil
Glad to help! I'm glad Phil was able to fill in the gaps that I wasn't able to explain clearly. Good luck on your project and happy Excel-ling! 🙂