Formula to convert cell values to a string with a quote mark

rono

New Member
Joined
Dec 9, 2002
Messages
4
Ok seems simple enough but can't seem to find a solution. I have some cols of data which I'd like to copy but I want the values enclosed in double-quote marks i.e.
A1234 -> "A1234"
The columns of data will be updated continously so I need a formula that can put in the quotes. If I do something like ="B1" Excel thinks the quote marks are for formatting and I only get the B1 value without quotes.
After some processing the quoted cols are clipped to a text file for processing in another prgm -which requires quotes as a delimiter.
Any ideas on a formula for this?
Thanks
Ron.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi rono:

Let us do this -- if your entry A1234 is in cell A1, then in cell B1, use the following formula:

'=""""&A1&"""" .... (this is with two pairs of DoubleQuote_marks on each side of A1)
 
Upvote 0
Thanks Yogi and Juan -That works great! I knew it couldn't be that difficult. I tried 2 double quotes -never would have guessed it requires 4 -Why? and why does a single quote CHAR(34) in Juan's example work?
Thanks
Ron.
 
Upvote 0
Because when you're using something like this

="Text here"

you're telling Excel that you're going to "send" him some Text. That's the *thing* with a quote. You just basically have to trick Excel into believing that the text is the quote.

So, that's why I use the CHAR(34) to avoid confusion. The CHAR function returns a string, in this case, the quote, then, I just join it with the text at hand.
 
Upvote 0

Forum statistics

Threads
1,217,881
Messages
6,139,185
Members
450,184
Latest member
Welsrot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top