Auto enclosing a value in brackets

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

Guest

I'm working on a csv file that has all its values enclosed in brackets []. I have to create about 200 more lines of data. Is there a formula that will automatically enclose anything I type, in brackets? ex. [Word]

Thanks
 
Bad Fish,

Use a custom format of

;;;"["@"]"

for all cells that you want to type strings into.

If you also need to do that for any numbers, then use something like this,
for 2 decimal places:

"["0.00"]";"["-0.00"]";"["0.00"]";"["@"]"

HTH,
Bernie
MS Excel MVP

BadFishGT said:
I'm working on a csv file that has all its values enclosed in brackets [].
I have to create about 200 more lines of data. Is there a formula that will
automatically enclose anything I type, in brackets? ex. [Word]
 
Hi Bernie,

Would that provide the required output in a csv file?



Bernie Deitrick said:
Bad Fish,

Use a custom format of

;;;"["@"]"

for all cells that you want to type strings into.

If you also need to do that for any numbers, then use something like this,
for 2 decimal places:

"["0.00"]";"["-0.00"]";"["0.00"]";"["@"]"

HTH,
Bernie
MS Excel MVP

BadFishGT said:
I'm working on a csv file that has all its values enclosed in brackets
[].
I have to create about 200 more lines of data. Is there a formula that will
automatically enclose anything I type, in brackets? ex. [Word]
 
One way would be to have a formula such as:

="["&A1&"]"

in each cell (to the extent of your data) of another sheet. When your data
input is finished you could then Copy them all, then Edit>Paste Special>As
Values, and delete the original sheet.


BadFishGT said:
I'm working on a csv file that has all its values enclosed in brackets [].
I have to create about 200 more lines of data. Is there a formula that will
automatically enclose anything I type, in brackets? ex. [Word]
 
Yes. When you save an Excel File as a CSV file, the formatted data is used
as the output to the file.

HTH,
Bernie
MS Excel MVP

Stephen Dunn said:
Hi Bernie,

Would that provide the required output in a csv file?



Bernie Deitrick said:
Bad Fish,

Use a custom format of

;;;"["@"]"

for all cells that you want to type strings into.

If you also need to do that for any numbers, then use something like this,
for 2 decimal places:

"["0.00"]";"["-0.00"]";"["0.00"]";"["@"]"

HTH,
Bernie
MS Excel MVP

BadFishGT said:
I'm working on a csv file that has all its values enclosed in brackets
[].
I have to create about 200 more lines of data. Is there a formula that will
automatically enclose anything I type, in brackets? ex. [Word]
 
Cheers.

Bernie Deitrick said:
Yes. When you save an Excel File as a CSV file, the formatted data is used
as the output to the file.

HTH,
Bernie
MS Excel MVP

Stephen Dunn said:
Hi Bernie,

Would that provide the required output in a csv file?



Bernie Deitrick said:
Bad Fish,

Use a custom format of

;;;"["@"]"
<snip>
 
Ignore. Use Bernie's solution.

Stephen Dunn said:
One way would be to have a formula such as:

="["&A1&"]"

in each cell (to the extent of your data) of another sheet. When your data
input is finished you could then Copy them all, then Edit>Paste Special>As
Values, and delete the original sheet.


BadFishGT said:
I'm working on a csv file that has all its values enclosed in brackets
[].
I have to create about 200 more lines of data. Is there a formula that will
automatically enclose anything I type, in brackets? ex. [Word]
 
Thanks for the info. Its working wonders now! GO BERNIE!

-----Original Message-----
Yes. When you save an Excel File as a CSV file, the formatted data is used
as the output to the file.

HTH,
Bernie
MS Excel MVP

Hi Bernie,

Would that provide the required output in a csv file?



Bad Fish,

Use a custom format of

;;;"["@"]"

for all cells that you want to type strings into.

If you also need to do that for any numbers, then use
something like
this,
for 2 decimal places:

"["0.00"]";"["-0.00"]";"["0.00"]";"["@"]"

HTH,
Bernie
MS Excel MVP

news:B82FB192-DBA0-4AAA-A52A- (e-mail address removed)...
I'm working on a csv file that has all its values
enclosed in brackets
[].
I have to create about 200 more lines of data. Is
there a formula that
will
automatically enclose anything I type, in brackets? ex. [Word]

Thanks


.
 
Back
Top