Inserting brackets in a column in Excel

Hi Folks,

I have a lonnnnng column of data in Excel. TO properly utilize a command for a listserv I need to have square brackets around the data in the column. How can I get the brackets around data in each cell without having to do this one by one?
First three rows is what I want....
[apple]
[orange]
[grapes]
data
data
data
dlewis61Asked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
Hi

you could create a helper's column with this formula copy the result and replace the values with Paste
Special
="["&A1&"]"

Open in new window

Regards
0
 
gplanaConnect With a Mentor Commented:
If "apple" is on cell A1, try to enter this on cell B1:

=CONCATENATE("[";A1;"]")

Then expand B1 to B10 to see first 10 results in square brackets. You can expand or copy to every row you want.

Hope it helps. Regards.
0
 
GlowmanConnect With a Mentor Commented:
or if you wanted a VBA solution you could just loop through the column and alter the value

dim dblRow as double:dblRow = 1

do until thisworkbook.sheets(1).range("A" & dblRow).value = ""
     thisworkbook.sheets(1).range("A" & dblRow).value =
                      "[" & thisworkbook.sheets(1).range("A" & dblRow).value & "]"
     dblRow = dblRow +1
loop

options are nice
0
 
dlewis61Author Commented:
Simplest and easiest to implement!
0
All Courses

From novice to tech pro — start learning today.