excel - Sum first three (or four) non blank cells in a row -


i have box office sheet. it's far more complex this, is:

enter image description here

i want sum first 3 days gross of each film (opening weekend), jumping blank cells. make little more complicated, want add possibility 4 or 5-day opening weekend. there column i'd enter number of days.

i'm familiarized basic functions , few complex ones. possible keep simple?

while try accomplish formula results without array formulas¹, don't know way accomplish without one.

in e4 array formula¹:

=sum(index(f4:l4, 0, match(1,sign(len(f4:l4)),0)):      index(f4:l4, 0, match(1,sign(len(f4:l4)),0)+d4-1)) 

fill down necessary. iferror functionality wrap around circumstanses # of days , available columns mismatched.

        sum_by_days


¹ array formulas need finalized ctrl+shift+enter↵. once entered first cell correctly, can filled or copied down or right other formula. try , reduce full-column references ranges more closely representing extents of actual data. array formulas chew calculation cycles logarithmically practise narrow referenced ranges minimum. see guidelines , examples of array formulas more information.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -