Column A contains 5-digit codes. The third digit is a distance code, and I
want to sum entries in column C if the third digit is 4, 5 or 6. The only
other codes for the third digit are 1, 2 and 3, so I can use ">3" since there
won't be anything over 6.
=SUMIF(MID(A1:A100,3,1),">3",C1:C100) isn't working for me.
Thank you, Brad
=SUMPRODUCT(--(MID(A1:A100,3,1)>3),C1:C100)
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wsihes

Signature
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
> Column A contains 5-digit codes. The third digit is a distance code, and
> I
[quoted text clipped - 6 lines]
>
> Thank you, Brad
T. Valko - 31 Mar 2008 19:04 GMT
You'll need to convert the result of MID to a number:
=SUMPRODUCT(--(--MID(A1:A100,3,1)>3),C1:C100)

Signature
Biff
Microsoft Excel MVP
> =SUMPRODUCT(--(MID(A1:A100,3,1)>3),C1:C100)
>
[quoted text clipped - 15 lines]
>>
>> Thank you, Brad