diff --git a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java index 3149129..435847d 100644 --- a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java +++ b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java @@ -187,11 +187,11 @@ public class Spreadsheet { else if (formula.startsWith("MITTELWERT(")) // e.g. MITTELWERT(A3:A5) - if (formula.length() < 17) + if (formula.length() < 18) result = "" + average(substringStartCell1, substringEndCell1); - else if (formula.length() < 18) - result = "" + average(substringStartCell2, substringEndCell2); else if (formula.length() < 19) + result = "" + average(substringStartCell2, substringEndCell2); + else if (formula.length() < 20) result = "" + average(substringStartCell3, substringEndCell2); else result = "0";