Conditional summing more complex than my brain

ArmstrongN

New Member
Joined
Nov 30, 2016
Messages
5
All - thanks in advance

I have a sheet with a big table... each month of the year has three columns - an item count (not always used) a forecast column and an actuals column.
I need to test each month to see whether on a row there is a figure for actuals (in which case take that) and if not take the forecast

so:

A B C D E F
item Item count Jan Forecast Jan actuals Item count Feb Forecast Feb actuals....
Widget 3 121.34 142.36 2 323.00 *formula for total needed*
doobry 2 45.64 4 160.00 *formula for total needed*


For each row I need to determine whether there's a value in the actuals column (Jan-Dec) and take the actual if it exists and the forecast if not and sum all at the end of the row

I can do this a really long way using 12 nested if statements but is there a slicker way of doing this eg using arrays (which I don't fully understand)?

Many thanks

Simon
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
ABCDEF... to Dec
itemitem countJan ForecastJan Actualsitem countFeb ForecastFeb actualstotal needed
widget3121.34142.262323.00
doobry245.644160.00
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGH
1itemitem countJan ForecastJan Actualsitem countFeb ForecastFeb actualstotal needed
2widget3121.34142.262323465.26
3doobry245.644160205.64
Data
Cell Formulas
RangeFormula
H2:H3H2=SUMIFS(C2:F2,D2:G2,"",$C$1:$F$1,"*forecast")+SUMIFS(C2:G2,$C$1:$G$1,"*actuals")
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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