Forum Discussion

Michael Estler's avatar
Michael Estler
Copper Contributor
Dec 11, 2017
Solved

Excel Array to shorten a very long Function

I need to condense a block (rows and columns) of cells that contain notes into one Notes field.  Some cells contain dates and some contain text.  I want to maintain the rows and columns of data but c...
  • SergeiBaklan's avatar
    SergeiBaklan
    Dec 13, 2017

    Hi Michael,

     

    I guess zero appears for empty cells, you may add one more check if the cell is empty or not

    =IF(LEN($B3)=0,0,
       TEXTJOIN(
          " ", FALSE,
          IF(ISNUMBER(INDIRECT("'" & $B3 & "'!C21:G33")),
             TEXT(INDIRECT("'" & $B3 & "'!C21:G33"),"dd/mm/yyyy"),
             IF(ISBLANK(INDIRECT("'" & $B3 & "'!C21:G33")),"",
                INDIRECT("'" & $B3 & "'!C21:G33"))
          ) &
          SUBSTITUTE( {"","","","","lf"}, "lf",CHAR(10))
          )
    )

    My guess TRUE/FALSE parameter for TEXTJOIN won't work in array formula