#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default SumIf help

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default SumIf help

=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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SumIf help

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SumIf right = 1 Marco Excel Discussion (Misc queries) 4 November 12th 07 03:33 PM
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"