Solved

Inserting brackets in a column in Excel

Posted on 2014-01-14
4
252 Views
Last Modified: 2014-01-14
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
0
Comment
Question by:dlewis61
4 Comments
 
LVL 15

Assisted Solution

by:gplana
gplana earned 100 total points
ID: 39779467
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
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 300 total points
ID: 39779469
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
 
LVL 4

Assisted Solution

by:Glowman
Glowman earned 100 total points
ID: 39779491
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
 

Author Closing Comment

by:dlewis61
ID: 39779677
Simplest and easiest to implement!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now