Thread: Sumif
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Sumif

If the range of your second set of characters might sometimes be larger then
the 5 numbers in your original example, say 10 to 25, you could use this
instead:

=SUMPRODUCT((MID(A1:A15,4,2)="55")*(MID(A1:A15,7,2 )="10")*(MID(A1:A15,7,2)<="25")*B1:B15)

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RagDyeR" wrote in message
...
Try this:
=SUMPRODUCT((MID(A1:A15,4,2)="55")*(MID(A1:A15,7,2 )={"10","11","12","13","14"})*B1:B15)

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Tarig" wrote in message
...
Hi,
I have all my General Ledger transactions imported in an Excel spreadsheet
from my accounting system like this:
Code Amount
65-55-10-654 1,200
75-55-11-856 1,000
85-57-10-864 100
65-58-13-024 50

I need a formula in one line that can sum up the amount if the range of
characters between the 4th and the 8th string is between 55-10 and 55-14,
which in this example is 2,200.

Thanks in advance,
--
tarig