Thank you in advance for you're help!
=IF(F40>2; Constantes!E13 * F39 * (F38/100); IF(F40>1; Constantes!E12 * F39 * (F38/100); IF(F40>0; Constantes!E11 * F39 * (F38/100); -1)))
program:
formula1 = 'IF(' + turnos_cell + '>0; ' + turno1 + ' * ' + main_formula + '; -1)'
formula2 = 'IF(' + turnos_cell + '>1; ' + turno2 + ' * ' + main_formula + '; ' + formula1 + ')'
formula3 = '=IF(' + turnos_cell + '>2; ' + turno3 + ' * ' + main_formula + '; ' + formula2 + ')'
escrever_celula(novo_documento, sheet_names[0], 'F42', formula3) # A function made by me to write to a cell using openpyxl
this is what is written to the cell is 3 nested ifs (I also tryed the same formula but in portuguese but I stil couldn't open the file after writing with python)4