View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff Biff is offline
external usenet poster
 
Posts: 1,688
Default Conditional sum matching two columns and a row

This works for me:

=SUMIF(C3:C7,"*OT",D3:D7)

Biff

"~L" wrote in message
...
I have a program that exports data to excel arranged like the following:
Property 1 Property 2
Property 3
Person1 Code1 10 (Hours)
Code2
Code2_OT
Code3_OT
Person2 Code2
40
Code2_OT 5
Person 3 Code 4 8
Code3_OT
Code4_OT
...n

The cells in the A column are merged. The B column has a useless text
label
in it that is the same for all cells. The codes in the C column are
somewhat
random, but any overtime code will have _OT after it.

What I'm trying to do is sum the overtime hours codes on one page and
regular hours codes on another page.

I've tried a few different approaches including sumifs and sumproducts and
index with matching. A problem common to all of them so far is that the
formulas return an error when using the wildcard character * to match text
(I've tried *"_OT", "*_OT", and *_OT and all are equally invalid).

Can anyone recommend a formula or approach to this problem?