Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default sumif and wildcards

I column B I have code numbers, 4 and 5 digit. In column E I have
corresponding financial values. I want to sum values which correspond to
sections of code numbers. ie by reading the first two or three digits of
grouped code number.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default sumif and wildcards

Perhaps something like this:

3 digit
=SUMPRODUCT((LEFT(B2:B100,3)="111")*E2:E100)

2 digit
=SUMPRODUCT((LEFT(B2:B100,2)="11")*E2:E100)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"oscarcounts" wrote:
I column B I have code numbers, 4 and 5 digit. In column E I have
corresponding financial values. I want to sum values which correspond to
sections of code numbers. ie by reading the first two or three digits of
grouped code number.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default sumif and wildcards

=SUMIF(B2:B100,"111*",E2:E100)

and so on

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"oscarcounts" wrote in message
...
I column B I have code numbers, 4 and 5 digit. In column E I have
corresponding financial values. I want to sum values which correspond to
sections of code numbers. ie by reading the first two or three digits of
grouped code number.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default sumif and wildcards

Thank you for this formula. It works if I modify the array in line with the
codes. The difficulty I have is that in some cases the first three digits of
the 4 and 5 digit codes are the same. Is there a remedy?

"Max" wrote:

Perhaps something like this:

3 digit
=SUMPRODUCT((LEFT(B2:B100,3)="111")*E2:E100)

2 digit
=SUMPRODUCT((LEFT(B2:B100,2)="11")*E2:E100)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"oscarcounts" wrote:
I column B I have code numbers, 4 and 5 digit. In column E I have
corresponding financial values. I want to sum values which correspond to
sections of code numbers. ie by reading the first two or three digits of
grouped code number.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default sumif and wildcards

Maybe, using MID instead of LEFT in the earlier expression
Post some examples of your data in col B
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"oscarcounts" wrote in message
...
Thank you for this formula. It works if I modify the array in line with
the
codes. The difficulty I have is that in some cases the first three digits
of
the 4 and 5 digit codes are the same. Is there a remedy?



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
Wildcards and if Arlene Excel Worksheet Functions 3 June 21st 07 12:05 AM
Wildcards in SUMIF Function Ron Excel Worksheet Functions 9 February 13th 07 08:17 PM
Wildcards in RTD JKC Excel Discussion (Misc queries) 0 February 3rd 06 07:35 PM
Wildcards irresistible007 Excel Worksheet Functions 2 December 20th 05 10:12 AM
Problems with SUMIF function and Wildcards (* and ?) J1J Excel Worksheet Functions 4 June 27th 05 04:25 PM


All times are GMT +1. The time now is 12:30 AM.

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

About Us

"It's about Microsoft Excel"