How to Ignore the last cell with data in an excel formula

159 views Asked by At

Good morning everyone!

This is my first question here.

I work with Revit and I am trying to organize a Keynote that should look something like this:

enter image description here

For this, I need to use a Txt Tab-delimited file, which is based on an excel file and define (see below in the right column) to which group each code belongs. This means, I need to concatenate all the cells and then always ignore the last cell that has a value (i.e. is not empty) in order to make my formula work.

enter image description here

For now, I have tried formulas similar to the one below, but I haven't found a solution yet. Has anyone tried something similar? The file is large and will probably suffer modifications over time, so doing it by hand is not the most convenient option.

=IF(D74="",C74,IF(E74="",CONCAT(C74," § ",D74),IF(F74="",CONCAT(C74," § ",D74,".",E74),CONCAT(C74," § ",D74,".",E74,".",F74))))

1

There are 1 answers

1
P.b On

I think this is what you mean or helps you in the right direction:

Office 365 needed: =C73&IFERROR(" § "&TEXTJOIN(".",0,INDEX(D73:G73,,TRANSPOSE(SEQUENCE(COUNTA(D73:G73)-1)))),"")

Prior version of Excel: =C73&IFERROR(" § "&TEXTJOIN(".",0,D73:INDEX(D73:G73,,MAX((E73:G73<>"")*(COLUMN(E73:G73))-4))),"")