sum multiple Adjacent columns based on TRUE or FALSE

Dares2

New Member
Joined
Feb 27, 2017
Messages
24
hi everyone,

I have a sheet (which updates the forecast sheet with actuals and therefore equals TRUE if its an actual column).
I am wanting to sum multiple columns based on the top of the column (row 11) being TRUE but summing all adjacent columns up to one column to the left of the last TRUE column and then add the last month of forecast. This then sums all the columns that are True up to the previous month and adds the current month of forecast column. for eg below would sum only July and add a forecast column for Aug month from an identical sheet.

Profit & Loss Forecast
July 2018 To June 2019
Month No.123
MonthAccount NameJulAugSep
Month is actualTRUETRUEFALSE
4-0000
Income
4-1000 Interest Received
4-1003 Interest received Term Deposit$2,467.73$1,212.31$2,000.00
4-1004 Interest received Cash at Bank$4,195.94 $39.46
4-2000 Loan fees
4-2001 Application fees $1,812.50$3,964.02

<colgroup><col><col><col><col span="2"></colgroup><tbody>
</tbody>


Can anyone help with this as not sure it is Sumproduct etc. I thought the first bit was
=SUM(IF(D11:O11="TRUE",D14:O14,0))

<tbody>
</tbody>
but this didnt work.

thanks
Darren
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Thanks Aladin, I seem to get a circular reference. =IF(COUNTIFS($D11:$O11,TRUE)>1,SUM(D14:INDEX($D14:$O14,COUNTIFS($D11:$O11,TRUE)-1)),0). Am I meant to reference the look up sheet as well ie after the index reference? ie sum D14 within a difference sheet index D14:014?
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,891
Members
449,194
Latest member
JayEggleton

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