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.

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

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")
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.