Reputation: 381
I'm trying to add multiple cells together and in between them, I need an IF-formula. I'm basically making a HTML-output based on a list I have and I need to check if a column has "Active" or "Terminated" in it, and based on that choose which html-class to use. Can you help me?
What I have is:
=CONCATENATE(M6;M7;M8;M9;M10;M11;M12;M14;M15)
What I need is this, in between M12 and M13:
IF((Table8[Status])="Active";"<div align="left" class="active">";"<div align="left" class="terminated">
Both formulas work, but I cannot get them to work togheter. And as this cell is repeated below itself, and the data in column M is matched with rows in another sheet, I need this to be in the same cell.
Upvotes: 1
Views: 1378
Reputation: 145
Are you sure your if statement works properly? You need double quotes as an escape character to use double quotes in a string. I've tried this and it worked fine if I understood what your query correctly.
=CONCATENATE(M6;M7;M8;M9;M10;M11;M12;IF(Table8[status]="Active";"<div align=""left"" class=""active"">";"<div align=""left"" class=""terminated"">");M14;M15)
Upvotes: 3