The Author
The Author

Reputation: 193

How to escape double quotes in an if else + concatenate formula

I kept looking on the web but seems that no one is asking about this scenario:

This is for an IF ELSE + CONCATENATE formula, which both uses double quotes.

To simplify its look, I will put "haha" and "hehe" instead of the actual texts that I need.

enter image description here

First, here's my IF ELSE formula

=IF(F4="multi","haha","hehe")

This will work perfectly.

But If I try to insert my CONCATENATE formula inside the IF ELSE, it won't, which is this:

="The 2020 amendment by ch. "&(B3)&", effective "&TEXT(D3,"mmmm, d, yyyy")&", "

The output should look like this "The 2020 amendment by ch. 1, effective August, 31, 2020,"

Now if I try to combine both, it should be like this:

=IF(F4="multi","="The 2020 amendment by ch. "&(B3)&", effective "&TEXT(D3,"mmmm, d, yyyy")&", "","hehe")

So now there's an invalid double quotes inside the IF ELSE formula. I'm sure a lot of professionals in Excel out there knows the workaround for this but I don't. Please help me understand this.

Upvotes: 1

Views: 332

Answers (1)

Ron Rosenfeld
Ron Rosenfeld

Reputation: 60289

You have a syntax error. The = should be only at the beginning of the formula.

=IF(F4="multi","The 2020 amendment by ch. "&(B3)&", effective "&TEXT(D3,"mmmm, d, yyyy")&", ","hehe")

Upvotes: 1

Related Questions