SUMIF - two sets of data, want to sum only one

Cascade

New Member
Joined
Aug 1, 2010
Messages
9
Hi all,

I got a problem, some financial data I have to sum.

There are two sets of data;
Forecasts and Actuals;

i.e.

Row: A1: FY2011 (Forecast) B1: FY2011 (Actual) ...... this goes on for a couple of years.

Row A20: Net profitFY2011(Forecast), B20: Net profitFY2011(Actual) ... this goes on for a couple of years.


I'm trying to sum only the forecasts separately vs. the actuals.

I can't just go sum(A20,B20 ....) and drag it across b/c it will add the actual numbers.

How would I be able to do this.
It's a pain manually selecting all the years by hand.

Cheers.
 
This adds A20, C20 ,...

=SUMPRODUCT(--(MOD(COLUMN(A20:Z20),2)=1),A20:Z20)
 
Upvote 0
This adds A20, C20 ,...

=SUMPRODUCT(--(MOD(COLUMN(A20:Z20),2)=1),A20:Z20)

Hey thanks,

How does it work?
I know what mod does, but why did it work with the column function?
And why did you;
a. use sumproduct? doesn't that multiply?
b. use "=1" at the end of the mod formula.
c. use "--"

Reason I ask is b/c I"m trying to adjust it to add all the forecasts now.

Thanks.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top