Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Easydoesit
 
Posts: n/a
Default SUMIF function retrieves "0"

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns. If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.





  #2   Report Post  
JMB
 
Posts: n/a
Default

The first argument for sumif is the criteria range, second argument is the
criteria (sumif implicitly compares the values in the criteria range against
this criteria, so it is usually expressed as "=5000", "<5000", or could be a
cell reference), third argument is the range to be summed. At any rate, it
doesn't sound like what you need

Try

=SUMPRODUCT((A2=A3)*(B2+B3))

You could use an If statement to return "" if A2<A3.

=IF(A2<A3,"",SUMPRODUCT((A2=A3)*(B2+B3))


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns. If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.






  #3   Report Post  
JMB
 
Posts: n/a
Default

Actually with an IF statement, you don't even need SUMPRODUCT (been a long
day).

=IF(A2<A3,"",B2+B3)


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns. If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.






  #4   Report Post  
Easydoesit
 
Posts: n/a
Default

why a2<a3 instead of a2=a3?
"JMB" wrote in message
...
Actually with an IF statement, you don't even need SUMPRODUCT (been a long
day).

=IF(A2<A3,"",B2+B3)


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns. If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I
incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.








  #5   Report Post  
RagDyeR
 
Posts: n/a
Default

I'm curious.

Have you tried JMB's formula?

What do you want to happen when A2 and A3 don't match?
--

Regards,

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

"Easydoesit" wrote in message
...
why a2<a3 instead of a2=a3?
"JMB" wrote in message
...
Actually with an IF statement, you don't even need SUMPRODUCT (been a long
day).

=IF(A2<A3,"",B2+B3)


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns. If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I
incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.











  #6   Report Post  
JMB
 
Posts: n/a
Default

you just have to switch the order

=IF(A2=A3,,B2+B3,"")

IF(test, condition if true, condition if false)

Do any of these formulas take you in the direction you want to go?


"Easydoesit" wrote:

why a2<a3 instead of a2=a3?
"JMB" wrote in message
...
Actually with an IF statement, you don't even need SUMPRODUCT (been a long
day).

=IF(A2<A3,"",B2+B3)


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns. If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I
incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.









  #7   Report Post  
Easydoesit
 
Posts: n/a
Default

Sure, the IF function works well enough. I wanted to simplify using SUMIF
since it seemed to be exactly what I want to do. But it must have some
limitation that I haven't figured out.

If A(n) not equal A(n-1), nothing happens in the corresponding C cell, and
that row becomes the first of the next sequence. The blank in the C cell
will help me find the discontinuances.

"JMB" wrote in message
...
you just have to switch the order

=IF(A2=A3,,B2+B3,"")

IF(test, condition if true, condition if false)

Do any of these formulas take you in the direction you want to go?


"Easydoesit" wrote:

why a2<a3 instead of a2=a3?
"JMB" wrote in message
...
Actually with an IF statement, you don't even need SUMPRODUCT (been a
long
day).

=IF(A2<A3,"",B2+B3)


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns.
If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I
incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.











  #8   Report Post  
JMB
 
Posts: n/a
Default

Need to point out I had too many commas in the last post. Should have read:

=IF(A2=A3,B2+B3,"")

You could substitute "" with whatever else you want to do with the
discontinuances. for example:

=IF(A2=A3,B2+B3,"No Match")

or return a zero or perform a different calculation.


"Easydoesit" wrote:

Sure, the IF function works well enough. I wanted to simplify using SUMIF
since it seemed to be exactly what I want to do. But it must have some
limitation that I haven't figured out.

If A(n) not equal A(n-1), nothing happens in the corresponding C cell, and
that row becomes the first of the next sequence. The blank in the C cell
will help me find the discontinuances.

"JMB" wrote in message
...
you just have to switch the order

=IF(A2=A3,,B2+B3,"")

IF(test, condition if true, condition if false)

Do any of these formulas take you in the direction you want to go?


"Easydoesit" wrote:

why a2<a3 instead of a2=a3?
"JMB" wrote in message
...
Actually with an IF statement, you don't even need SUMPRODUCT (been a
long
day).

=IF(A2<A3,"",B2+B3)


"Easydoesit" wrote:

This is a re-send due to no reply before.

I am getting a 0 as my result, consistently. I have three columns.
If
$A$n=$A$(n-1), I want to add the value in $B$(n-1) to $B$n. I
incremented
the SUMIF value by extending the formula from C2 all the way down.

=SUMIF(b2:b3,A3=A2,b2:b3)

What might keep the function from working properly?
--Dave.












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
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Can SUMIF function include AND function ShaneS Excel Worksheet Functions 1 May 17th 05 03:24 AM
Dynamic sumif function Jimbola Excel Worksheet Functions 5 May 4th 05 01:10 AM
SUMIF function yak10 Excel Worksheet Functions 0 February 12th 05 05:12 PM
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 04:25 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"