LibreOffice bundled with openSUSE 11.2.

I want to add a column of numbers based on the contents of another column
of text.

For example:
Scan rows 1 through 150.
If C# contains 'spit' then add the contents of D# to total.

I tried sorting on column C so that all the 'spit' was together then
summing D. And then for all the cells in Column C that had 'tune',
summed D, etc.

These sheets need to be left sorted by date so when I changed the sort
back to that, the totals all broke.

I also tried fdisk but that opened another can of worms so I went fishing.