Jump to content

need help with google spreadsheet


Recommended Posts

Posted

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,

 

Posted (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 by inababila
  • Like 1
Posted (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 by inababila

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...