Simplifying an if formula

psrs0810

Well-known Member
Joined
Apr 14, 2009
Messages
1,109
I have this long drawn out if formula that I know can be simplified. If anyone can assist, that would be great

=IF('ASA Levels'!$N$4="TRUE",SUM(C12:N12),IF('ASA Levels'!$M$4="TRUE",SUM(C12:M12),IF('ASA Levels'!$L$4="TRUE",SUM(C12:L12),IF('ASA Levels'!$K$4="TRUE",SUM(C12:K12),IF('ASA Levels'!$J$4="TRUE",SUM(C12:J12),IF('ASA Levels'!$I$4="True",SUM(C12:I12),IF('ASA Levels'!$H$4="True",SUM(C12:H12),IF('ASA Levels'!$G$4="True",SUM(C12:G12),IF('ASA Levels'!$F$4="True",SUM(C12:F12),IF('ASA Levels'!$E$4="True",SUM(C12:E12),IF('ASA Levels'!$D$4="True",SUM(C12:D12),IF('ASA Levels'!$C$4="True",SUM(C12:C12),""))))))))))))

The gist of the formula is that if a month comes back "True" to sum that month and all of the prior months to get a YTD value.
Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Assuming there is only one TRUE at a time then try

=SUM(C12:OFFSET(C12,0,MATCH(TRUE,'ASA LEVELS'!C4:N4,0)-1))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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