i've some issue with If fonction. I'm working on Google sheet, that may be the reason with this doesn't work buti juste got into coding. The main probleme is the IF fonction. i ask to do something if XY is bigger then 100 : the probleme is no matter what number it's even under or over 100 will still get trought the if.
Here's my code
function myfunction() {
var exp = ("a38");
var expmax = ("B38");
var exptotal = ("e31");
var level = ("f31");
var bronze = ("C2");
var fer = ("D2");
var mitrite = ("E2");
var adamantit = ("F2");
var runite = ("G2");
var dragonite = ("H2");
var expmoin= exp -expmax
SpreadsheetApp.getActiveSheet().getRange(bronze).setValue(SpreadsheetApp.getActiveSheet().getRange(bronze).getValue() + 1);
SpreadsheetApp.getActiveSheet().getRange('a38').setValue(SpreadsheetApp.getActiveSheet().getRange('a38').getValue() + 8);
IF (exptotal >= 100) {
SpreadsheetApp.getActiveSheet().getRange(level).setValue(SpreadsheetApp.getActiveSheet().getRange(level).getValue() + 1);
}
else {
SpreadsheetApp.getActiveSheet().getRange('G31').setValue(SpreadsheetApp.getActiveSheet().getRange('G31').getValue() + 1);
}
}
thank you if you havesome information for me
Aucun commentaire:
Enregistrer un commentaire