
Signature
Additional information:
- I'm using Office XP
- I'm using Windows XP
>A difficult conditonal calculation
>
[quoted text clipped - 26 lines]
>How can I achieve this?
>Thanks a lot.
It would probably be simpler if all of your data were in the same row.
However, with your presently described layout, assuming your table is in
A1:Bn
then the formula to sum an individual category is:
=SUMIF($A$2:$A$n,CategoryType,$B$1:$B$n-1)
or, if you have 1,000 rows of data:
=SUMIF($A$2:$A$1000,CategoryType,$B$1:$B$999)
From there it is easy:
Income: =SUMIF($A$2:$A$n,"Income",$B$1:$B$n-1)
One-Off: =-SUMIF($A$2:$A$n,"One-Off",$B$1:$B$n-1)
Daily: =-30*SUMIF($A$2:$A$n,"Daily",$B$1:$B$n-1)
Asset A:
=(SUMIF($A$2:$A$1000,"Asset A",$B$1:$B$999) -
1000*COUNTIF($A$2:$A$1000,"Asset A"))*3/5
--ron