Master00j Posted March 6, 2018 Share Posted March 6, 2018 For my powerlevelservice i'm trying to make a calculator. this code calculates everything between level 1-70 @14gp/xp and from 70-99 @7gp/xp. But when i cross the 70 for example if i want to calculate: 40-85 it multiplies with 14. Is there anyway to get this work properly? =ALS($B$9<=70;((VERT.ZOEKEN($C$9;$A:$B;2;0)-VERT.ZOEKEN($B$9;$A:$B;2;0))*14);ALS(C9<=71;(((VERT.ZOEKEN(70;$A:$B;2;0)-VERT.ZOEKEN($B$9;$A:$B;2;0))*7)+((VERT.ZOEKEN($C$9;$A:$B;2;0)-VERT.ZOEKEN(70;$A:$B;2;0))*7));((VERT.ZOEKEN($C$9;$A:$B;2;0)-VERT.ZOEKEN($B$9;$A:$B;2;0))*7))) Cheers, Quote Link to comment Share on other sites More sharing options...
ryan1169 Posted March 6, 2018 Share Posted March 6, 2018 you can do 3 separate equations. for example Cell A contains the result of 40-70 prices, Cell B contains the result of 70-85 prices, Cell C contains A+B Quote Link to comment Share on other sites More sharing options...
inababila Posted March 6, 2018 Share Posted March 6, 2018 (edited) EXPLANATION OF HOW TO DO IT: -------------------------------------------------------------------------------------------------------------------- Format: int-int -> from-to. Case 1: If from-to is in the region of 1-70 do the first calculation, and 70-99 the second as it is. if/else if Else Case 2: Divide the calculation into 2 separate conditions. 1-) Check if from<=70 then 70-from individually 2-) if to>=70 then 99-to individually. after that add them up together and don't forget the remainder. ----------------------------------------------------------------------------------------------------------------------------------------- I hope this helped you. Good luck! Edited March 6, 2018 by inababila 1 Quote Link to comment Share on other sites More sharing options...
Master00j Posted March 6, 2018 Author Share Posted March 6, 2018 So no chance of getting it fixed in one calculation? Quote Link to comment Share on other sites More sharing options...
inababila Posted March 6, 2018 Share Posted March 6, 2018 (edited) 11 minutes ago, Master00j said: So no chance of getting it fixed in one calculation? For me, that is my knowledge since I am not that professional yet. Maybe someone else with more experience will help Edited March 6, 2018 by inababila Quote Link to comment Share on other sites More sharing options...
Master00j Posted March 6, 2018 Author Share Posted March 6, 2018 2 minutes ago, inababila said: For me, that is my knowledge since I am not that professional yet. Maybe someone else with more experience will help Yeah thanks for the reply i hope someone can help me to get it fixed in one calculation Quote Link to comment Share on other sites More sharing options...
inababila Posted March 6, 2018 Share Posted March 6, 2018 (edited) 3 minutes ago, Master00j said: Yeah thanks for the reply i hope someone can help me to get it fixed in one calculation Oh wait! Case 2 could do it in one calculation because it separates and calculates everything individually. From, and to alone, and then adds them up together. Edited March 6, 2018 by inababila Quote Link to comment Share on other sites More sharing options...
DarkFaith Posted March 6, 2018 Share Posted March 6, 2018 Depending on how the sheet is set up, it should be possible for it to be done with nested IF/VLOOKUP functions. If you want me to take a look at it, let me know. Quote Link to comment Share on other sites More sharing options...
Master00j Posted March 6, 2018 Author Share Posted March 6, 2018 Just now, DarkFaith said: Depending on how the sheet is set up, it should be possible for it to be done with nested IF/VLOOKUP functions. If you want me to take a look at it, let me know. I could use some help yes . whats your skype/discord? Quote Link to comment Share on other sites More sharing options...