Solved

Inserting brackets in a column in Excel

Posted on 2014-01-14
4
264 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

777 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