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

Google Sheets: how to down-fill and prevent incrementing in a specific Cell Number Reference


Formula:

=IFNA(INDEX(TRIM(ARRAY_CONSTRAIN(SUBSTITUTE(SPLIT(REGEXEXTRACT($A3, B1&"(.+)"), "]"), "[", ), 1, 2))), 0)

I want to down-fill and prevent incrementing in B1 Cell Number Reference, I mean I want to change the Number Reference of A3 cell, example: A3 - A4 - A5 - A6 ... but I don' want to change the Number Reference of B1 cell when down-filling.

I hope my question is understandable.


Solution

  • use arrayformula:

    =IFNA(INDEX(IF($A3:$A="",,TRIM(ARRAY_CONSTRAIN(SUBSTITUTE(SPLIT(
     REGEXEXTRACT($A3:$A, B1&"(.+)"), "]"), "[", ), 99^99, 2)))), 0)
    

    enter image description here