Hello,
I’ve quite new with libreoffice calc and I’ve having trouble with the following problem for over a week now.
I have 4 numbers that I need to do math operation with. First three numbers need to be average() and the 4th should be added to the sum after the average is caluculated. However, these numbers are also caluclated through inserting some data, so sometimes there is no data for a some of these numbers. If there are no numbers it says #DIV/0! which does not bother me but the problem lies when I need to caluclate the average of 3 + the 4th numbers when one or more numbers are missing. I get a #DIV/0!. So I found a function called ISERROR and I check if there is an error in the cell ignore the cell( meaning there is no data for that cell/number) and do the math with other data. I need to do all the cases in the IFS function but when I do 2 cases everything works fine after I enter 3rd case I get #N/A result in that cell - it doesn’t matter which cases I put, first 2 work good and then I get #N/A. If anyone can help me I would be really grateful. Also I’m aware that the table is probably horrible but I just started.
This is the function:
=IFS(AND(ISERROR(C39)=0;ISERROR(C84)=0;ISERROR(AF84)=0;ISERROR(AL84)=1) ;IF(AVERAGE(C39;C84;AF84) >=I1;I1;AVERAGE(C39;C84;AF84));AND(ISERROR(C39)=0;ISERROR(C84)=0;ISERROR(AF84)=1;ISERROR(AL84)=1) ;IF(AVERAGE(C39;C84) >=I1;I1;AVERAGE(C39;C84));AND(ISERROR(C39)=0;ISERROR(C84)=1;ISERROR(AF84)=0;ISERROR(AL84)=1) ;IF(AVERAGE(C39;AF84) >=I1;I1;AVERAGE(C39;AF84)))
However, when I put the 3rd case in a seperate cell it works fine… so I assume I’m making mistake somewhere in the IFS instead of case .
This works when put in different cell:
=AND(ISERROR(C39)=0;ISERROR(C84)=1;ISERROR(AF84)=0;ISERROR(AL84)=1)
=IF(AVERAGE(C39;AF84) >=I1;I1;AVERAGE(C39;AF84))
I’m attaching also the whole ods file if anyone cares to take a look. C39 is where the solution will be eventually but I36 is where I experimented with formula.
Best regards,
Marko
(Slightly edited by @Lupp. Formulas ONLY set to ‘rreformatted text’! No mcharacters changed / deleted / inserted.)