wrap quotes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this is what one line looks like, for example:

Boom 5 bling 4 ding 3

i want to apply a cell format that would make the cells look like this:

"('Boom', '5', 'bling', '4', 'ding', '3')"


as you can see, the first cell has a double quote and a paranthese.
and the last cell has a closing paranthese and a doublequote.

the rest are wrapped in single quotes followed by a comma.

i've figured out the cell format for all the cells, except the first and
last one.
how would I specify the cell format for the first cell and the last cell?
(its not working for me)

oh, and 2nd question:

Sometimes, the cells with TEXT values in willl sometimes have the NUMBER 0
in them (if a condition is false or what not.)

The 0 wont have the same format applied becuz it is a NUMBER in a text
formatted cell.
.. how would i also apply a number cell format? or treat the number as text?

(perhaps a conditional format would help...i just dont know how to write it)

thanks in advance, if you can help with either question
 
You can use this formula for your first string. Use accordinlgy for last
string.

=CONCATENATE("""","(","'",E7,"'",",")
 
hey
altho your method does work, i used this cell format: \"('@',
it saved me from having to edit every cell (and the cells with formulas
already in them would look more confusing)

BTW, can you help me with the 0 problem?
the columns with text values in them, will sometimes have a "0" in some cells
(based on some conditions)

those columns have a text cell format..so it wouldnt apply to a 0.
maybe a conditional format would help... can you show me how i would do this?
i want all instances of 0 to be like this : '0',
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top