Home > Blockchain >  Concatenating 0s in excel
Concatenating 0s in excel

Time:01-07

I have these data:

enter image description here

Data format:

V1  V2  V3      RESULT  EXPECTED RESULT
0   0           000     00
0   0   1       00      00
0   0   0       000     000
0               000     0
0   1           00      0
0   1           00      0

In the Result cells, I have the following formula:

=TEXTJOIN("",FALSE,IF(A2:C2=0,A2:C2,""))

I tried to write the same formula with concatenate and text function too but couldn't get the result I wanted. How can I get the expected results? Can I get some help, please? Thanks.

CodePudding user response:

One option using REPT together with COUNTIF:

=REPT(0,COUNTIF(A2:C2,0))

enter image description here

  •  Tags:  
  • Related