27

I'm trying to concatenate several fields and want certain fields to start and end with quotes ("....."). When I put a cell (B2) inside this, the cell (B2) is shown as plain text with quotes around it.

CONCATENATE("""B2""") -> "B2"

CONCATENATE("""B2""") -> "(whatever is in cell B2)"

5 Answers 5

70

Try this:

CONCATENATE(""""; B2 ;"""")

@widor provided a nice solution alternative too - integrated with mine:

CONCATENATE(char(34); B2 ;char(34))
1
  • 1
    This is working for me -> CONCATENATE("""", B2 ,"""")
    – Sam
    Apr 30, 2016 at 15:13
17

Use CHAR:

=Char(34)&"This is in quotes"&Char(34)

Should evaluate to:

"This is in quotes"
1
  • 1
    would be interesting to know, which of those solutions is faster on a big scale - otherwise I find them quite equal. Anyone tested this?
    – Jook
    Sep 7, 2012 at 11:51
12

You can also use this syntax: (in column D to concatenate A, B, and C)

=A2 & " """ & B2 & """ " & C2

Excel formula to concatenate with quotes

1

easier answer - put the stuff in quotes in different cells and then concatenate them!

B1: rcrCheck.asp
C1: =D1&B1&E1
D1: "code in quotes" and "more code in quotes"  
E1: "

it comes out perfect (can't show you because I get a stupid dialog box about code)

easy peasy!!

1
  • 1
    Thanks for you effort, but it was solved over a year ago ;) your solution wasn't an option
    – CustomX
    Jan 5, 2014 at 19:35
0

I was Forming some Programming Logic Used CHAR(34) for Quotes at Excel : A small Part of same I am posting which can be helpfull ,Hopefully

1   Customers
2   Invoices

Formula Used :

=CONCATENATE("listEvents.Add(",D4,",",CHAR(34),E4,CHAR(34),");")

Result :

listEvents.Add(1,"Customers");
listEvents.Add(2,"Invoices");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.