Summing if several conditions apply
Bexi,
Now I understand. Sorry for the slow response here.
*Without* the complication of the WWE# rollup which you mentioned towards
the end, here's how your formulas would look.
For column C:
{=SUM(IF(A1=Sheet2!$A$1:$A$1000,IF(Sheet2!$D$1:$D$ 1000="A",Sheet2!$C$1:$C$1000)))}
Column D would be the exact same, except you'd substitute "B" for "A"
With the additional WWE# complication you'd need a more complicated formula:
{=IF(A1<"WWE#-532053T",SUM(IF(A1=Sheet2!$A$1:$A$1000,IF(Sheet2!$ D$1:$D$1000="A",Sheet2!$C$1:$C$1000))),SUM(IF("HK
#-532053T"=Sheet2!$A$1:$A$1000,IF(Sheet2!$D$1:$D$100 0="A",Sheet2!$C$1:$C$1000)))+SUM(IF("SN
#-532053T"=Sheet2!$A$1:$A$1000,IF(Sheet2!$D$1:$D$100 0="A",Sheet2!$C$1:$C$1000))))}
"Bexi" wrote:
Eddie,
The data is as follows:
Sheet1
A B C D
CH #-812081T CH815
HK #-812081T CH815
TH #-752075T AS755
RP #-752075T AS755
WWE#-532053T WW535
Sheet2
A B C D
CH #-812081T CH815 125,000 B
CH #-812081T CH05 6,180 A
HK #-812081T CH815 75,000 B
HK #-532053T 5785 4,519.58 A
RP #-752075T AS755 89,000 B
RP #-752075T 213.72 A
SN #-532053T WW535 30,000 B
SN #-532053T 425.83 A
SN #-532053T WW535 13,000 B
TH #-752075T AS755 11,000 B
I want the values from Sheet2 to show on Sheet1 on Columns C and D in
their respective row.
Sheet2 is export data from accounting where A=Actuals and B= Budget
shown on column D.
Column C is to show Actuals and it should sum the values found on
sheet2
Column D is to show Budget and it should sum the values found on sheet2
HK #-532053T and SN #-532053T should roll up to the WWE#-532053T for
both budget and actuals.
Thanks for your help.
Bexi
|