Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tat
 
Posts: n/a
Default adding summed cells in a conditional sumif

I would like the sumif statment to add the values in cells that are generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28 is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.
  #2   Report Post  
Tat
 
Posts: n/a
Default

It works now. I forgot the cntrl+shift+enter when I edited the formula. Duh!

Sorry.

"Tat" wrote:

I would like the sumif statment to add the values in cells that are generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28 is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.

  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

It's nothing wrong with the formula per se although it is probably better to
use

=SUMPRODUCT(--($A$27:$A$38=P27),$L$27:$L$38)

which you can enter normally, regardless it must be something wrong with
your criteria
your table makes no sense. what is in A27:A38?

--
Regards,

Peo Sjoblom

(No private emails please)


"Tat" wrote in message
...
I would like the sumif statment to add the values in cells that are
generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives
me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28
is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.


  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

And how about just plain old =sumif()

=SUMIF($A$27:$A$38,P27,$L$27:$L$38)



Tat wrote:

I would like the sumif statment to add the values in cells that are generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28 is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.


--

Dave Peterson
  #5   Report Post  
Tat
 
Posts: n/a
Default

Column A includes years that the critiria in P has to match.
Thanks for your answer.

"Peo Sjoblom" wrote:

It's nothing wrong with the formula per se although it is probably better to
use

=SUMPRODUCT(--($A$27:$A$38=P27),$L$27:$L$38)

which you can enter normally, regardless it must be something wrong with
your criteria
your table makes no sense. what is in A27:A38?

--
Regards,

Peo Sjoblom

(No private emails please)


"Tat" wrote in message
...
I would like the sumif statment to add the values in cells that are
generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives
me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28
is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.





  #6   Report Post  
Tat
 
Posts: n/a
Default

That works fine too. Thanks

"Dave Peterson" wrote:

And how about just plain old =sumif()

=SUMIF($A$27:$A$38,P27,$L$27:$L$38)



Tat wrote:

I would like the sumif statment to add the values in cells that are generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28 is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.


--

Dave Peterson

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
Adding contents of one cell to a range of cells. CLJinVA Excel Worksheet Functions 1 February 10th 05 10:19 PM
Copying cells with conditional formatting Benfanfromlo Excel Discussion (Misc queries) 3 February 10th 05 06:12 PM
conditional formating - Highlighting text cells based on sales res ANDREW_B Excel Discussion (Misc queries) 7 December 2nd 04 04:27 PM
HELP ME PLEASE!! CONDITIONAL FORMATING HIGHLIGHTING CELLS. ANDREW_B Excel Discussion (Misc queries) 1 December 2nd 04 04:12 PM
Conditional Format With SUMIF Minitman Excel Worksheet Functions 3 November 1st 04 02:58 PM


All times are GMT +1. The time now is 07:25 PM.

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"