1

I need to calculate averages on my expenses spreadsheet, so I figured out I could do something like this:
- get all cells that have the text "electric bill"
- get the cell at the right of that one, get that value
- average all the values

How can I script this in OO calc? excel tips may work also.

1 Answer 1

2

In Excel 2007/2010 you can use AvereageIf. Assuming bill in column A and amount in column B:

=AVERAGEIF(A2:A10,"electric bill",B2:B10)

AverageIf in Excel

If OpenOffice doesn't support that, try SumIf divided by Countif:

=SUMIF(A2:A10,"electric bill",B2:B10)/COUNTIF(A2:A10,"electric bill")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .