Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=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 -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Brad E." wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You'll need to convert the result of MID to a number:
=SUMPRODUCT(--(--MID(A1:A100,3,1)3),C1:C100) -- Biff Microsoft Excel MVP "Bernard Liengme" wrote in message ... =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 -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Brad E." wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SumIf right = 1 | Excel Discussion (Misc queries) | |||
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" | Excel Worksheet Functions | |||
Embedding a Sumif in a sumif | Excel Worksheet Functions | |||
nested sumif or sumif with two criteria | Excel Worksheet Functions | |||
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function | Excel Worksheet Functions |