View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default SUMPRODUCT calculating difference between column values

The following formula works great when each row of columns G and H contain
values:

=SUMPRODUCT((Data!$D$2:$D$10000=E5)*(Data!$H$2:$H$ 10000=A6)*(Data!$H$2:$H$10000<C6)*((Data!$H$2:$H$ 10000-Data!$G$2:$G$10000)*24E6))

My problem is that column H rows do not always contain a value, and might
contain "". This is data from a database i can't control. How do i "trap"
these values.

As you can see from the formula, i'm not interested in the result from these
rows. The data in columns G and H are dates, by the way. I attempting to
calculate elapsed times, for rows where column D's value equals E5 and the
end time (in H) is equal or greater than A6 and less than C6, when BOTH start
and end times are present.

I've searched high and low. The experts on this forumn always have the
answer. Help please!

Mike