Concatenate three cells into one separated with a comma (trim trailing space and commas): =IF(TRIM(J2)=””,IF(TRIM(I2)=””,H2, TRIM(H2&”, “&I2)),TRIM(H2&”, “&I2&”, “&J2) ) Concatenate two cells into one separated with a comma (trim trailing space and commas): =IF(TRIM(L2)&TRIM(K2)=””,””,IF(TRIM(L2)=””, IF(TRIM(K2)=””,””,TRIM(K2&”, “&L2), )