ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Sum (https://www.excelbanter.com/excel-discussion-misc-queries/125696-conditional-sum.html)

Bongard

Conditional Sum
 
Hi, I am trying to get totals at the bottom of my report based on
another columns value. I am trying to sum all of the values to the
right of every instance of this value above. I tried a vlookup formula
but it only returns the first value where the logic is true. I will
give you my vlookup formula so that this may make more sense.
=VLOOKUP(K3037,K$4:L$3027,2,FALSE)
Where K3037 = 1.1, so I want the sum of the values (in column L) for
every instance of 1.1 in the range k4:k3027. There may be 10 instances
of 1.1 in column L in that range so the formula must take into account
all instances.

I hope this is clear and I appreciate any help in advance!

-Brian


Don Guillett

Conditional Sum
 
Have a lool in the help index for SUMIF. For more conditions you can use
sumproduct((

--
Don Guillett
SalesAid Software

"Bongard" wrote in message
oups.com...
Hi, I am trying to get totals at the bottom of my report based on
another columns value. I am trying to sum all of the values to the
right of every instance of this value above. I tried a vlookup formula
but it only returns the first value where the logic is true. I will
give you my vlookup formula so that this may make more sense.
=VLOOKUP(K3037,K$4:L$3027,2,FALSE)
Where K3037 = 1.1, so I want the sum of the values (in column L) for
every instance of 1.1 in the range k4:k3027. There may be 10 instances
of 1.1 in column L in that range so the formula must take into account
all instances.

I hope this is clear and I appreciate any help in advance!

-Brian




Bongard

Conditional Sum
 
Thanks for the reply Don. I have played around with the sumif formula a
bit and can't seem to get it to do what I need. Do you have any
pointers? I think where my formula won't work the criteria portion. I
am trying to say k3037=$k$4:$k$3027 excel doesn't seem to like this.
Any ideas on what I could use for my criteria, range, and sum_range to
get this formula to work? Or could you give me a similar example that i
could tailor to fit my ranges?

Thanks,
brian


Bongard

Conditional Sum
 
Got it, thanks for your help Don. My problem was that I was trying to
use a cell reference for the criteria and it only allows you to use a
number, text or an expression. I had to manually type the criteria then
for every formula, but this was a quick workaround for conditionally
summing 3000 rows.

Thanks!


Bob Phillips

Conditional Sum
 
No you can use a cell reference, for instance

=SUMIF(A:A,"="&H1,B:B)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Bongard" wrote in message
oups.com...
Got it, thanks for your help Don. My problem was that I was trying to
use a cell reference for the criteria and it only allows you to use a
number, text or an expression. I had to manually type the criteria then
for every formula, but this was a quick workaround for conditionally
summing 3000 rows.

Thanks!





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com