Search code examples
google-sheetsgoogle-sheets-formulaarray-formulas

Google Sheets: Use ArrayFormula to copy a formula until a set value


I'm trying to create a formula until a set value using ArrayFormula in Google Sheets.

The end result values can be viewed on the spreadsheet: https://docs.google.com/spreadsheets/d/1yBC4oQuhKOkIkf3lQZGBKcZQ3YjU_5N6MCIJZzdt0O4/edit?usp=sharing

Thank you!


Solution

  • delete everything from red cells and use this in D4:

    =ARRAYFORMULA(IFERROR(SUBSTITUTE(SPLIT(REPT("♠♥", B4:B-1)&
     REPT(B1/C4:C&"♥", C4:C), "♥"), "♠", )))
    

    enter image description here