Cummulative sum against Condition

  • Thread starter Thread starter Surya
  • Start date Start date
S

Surya

I would like to calculate the sum of column B if the cells against that on
column A satisfy my condition. In column A i have about 8 to 10 types of
entries with some quantites against each entry in column B. The sum shall be
calulated in a separate sheet say 'sheet 2'. Every time i enter a value in
column A & B in 'Sheet 1'. The corresponding sum shall be updated against
that type of entry in 'sheet 2'. Vlookup only gives the vakue against one
type but does not consider if the same type appear later in that column.
Please suggest a suitable formulae for this calulation.
 
pls provide an example on before and after result
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another
 
Surya said:
I would like to calculate the sum of column B if the cells against that on
column A satisfy my condition. In column A i have about 8 to 10 types of
entries with some quantites against each entry in column B. The sum shall be
calulated in a separate sheet say 'sheet 2'. Every time i enter a value in
column A & B in 'Sheet 1'. The corresponding sum shall be updated against
that type of entry in 'sheet 2'. Vlookup only gives the vakue against one
type but does not consider if the same type appear later in that column.
Please suggest a suitable formulae for this calulation.


Use SUMIF...

=SUMIF(Range,Criteria,RangeToSum)
 
Hi Surya

Suppose you have your data in the below format in Sheet1

ColA ColB
Type Quantity
Type1 2
Type2 1
Type3 2
Type1 1
Type2 4

In Sheet2 ColA you have the unique entries for each type
ColA ColB
Type1 =
Type2 =
Type3 =

In sheet2 Col B, cell B1 enter the below formula; which will give you the
sum of 'type 1' from Sheet1

=SUMIF(Sheet1!A:A,"Type1",B:B)


If this post helps click Yes
 
Hi,

And of course the SUMIF is more flexible if the criteria is a cell such as

=SUMIF(Sheet1!A:A,A1,Sheet1!B:B)

where the type is in A1 of sheet2 along with the formula. This way you can
copy the formula down and calculate the sum for other types.
 
Back
Top