Calc: sumif question

I have a pivot table with results representing hours and dollar amounts. These values total to the right over a number of fields, and then appear in adjacent cells within a column:
hours
value
hours
value
...

I ned to sum the hours and values separately (the right hand totals columns may have been calculated differently, so I cannot just rely on the running cross-sum in the bottom right hand corner. In the right-hand totals, some columns from the pivot may have been excluded, for example, so my only source for the overall totals that I want is the right-hand column.

I could do this if I could access the row() value for individual elements, either in a sumif or by means of a filter, but I don't know whether this is possible, and in the test I tried, it did not work. Can anyone suggest a way to do this?

Peter West

"For my yoke is easy, and my burden is light."