Need Help to SUM First NON_BLANK Cell

HotNumbers

Well-known Member
Joined
Feb 14, 2005
Messages
732
Need Help to Sum 12 columns from the first non blank cells that appear only after a certain criteria is meet. The Data columns are from Column G:AP. The Criteria that I need are in Columns BD and BE. The formula will be in BF. Here is what I need

If BD is Blank and BE is (Burbank or ESCO) then I need it to sum 12 columns from the first non Blank Cell if There is data in BD and BE then I want

IF(ISERROR(SUM(INDEX(G96:BC96,MATCH(BD96,NC_FY_PERIODS,0)-3):INDEX(G96:BC96,0,MIN(MATCH(BD96,NC_FY_PERIODS,0)+14)))),"",SUM(INDEX(G96:BC96,MATCH(BD96,NC_FY_PERIODS,0)-3):INDEX(G96:BC96,0,MIN(MATCH(BD96,NC_FY_PERIODS,0)+14))))
 
How can I JOIN THese Two separate formuls into one? They Both work on there own, However I need to combine it to work

=IF((BD2="")*(OR(BE2={"Burbank","Esco"})),SUM(INDEX(G2:BB2,MATCH(TRUE,INDEX(G2:BB2<>"",0),0)):INDEX(G2:BB2,MATCH(TRUE,INDEX(G2:BB2<>"",0),0)+11)),"")


IF(ISERROR(SUM(INDEX(G96:BC96,MATCH(BD96,NC_FY_PERIODS,0)-3):INDEX(G96:BC96,0,MIN(MATCH(BD96,NC_FY_PERIODS,0)+14)))),"",SUM(INDEX(G96:BC96,MATCH(BD96,NC_FY_PERIODS,0)-3):INDEX(G96:BC96,0,MIN(MATCH(BD96,NC_FY_PERIODS,0)+14))))
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I'm assuming that this part of the formula...

MIN(MATCH(BD2,NC_FY_PERIODS,0)+14)

...should actually be...

MIN(MATCH(BD2,NC_FY_PERIODS,0),14)

If this is the case, try the following...

=IF((BD2="")*(OR(BE2={"Burbank","Esco"})),SUM(INDEX(G2:BC2,MATCH(TRUE,INDEX(G2:BC2<>"",0),0)):INDEX(G2:BC2,MATCH(TRUE,INDEX(G2:BC2<>"",0),0)+11)),IF((BD2<>"")*(BE2<>""),SUM(INDEX(G2:BC2,MATCH(BD2,NC_FY_PERIODS,0)-3):INDEX(G2:BC2,0,MIN(MATCH(BD2,NC_FY_PERIODS,0),14))),""))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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