ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pre-pending and post-pending cell data in Excel (https://www.excelbanter.com/excel-programming/279003-pre-pending-post-pending-cell-data-excel.html)

David Neustadt

Pre-pending and post-pending cell data in Excel
 
Question:

Is there a VB command or a way in Excel to prepend and postpend data
in an Excel cell.

For example, let's say I have a column with the following numbers

11888
3623
1234

How can I format all the cells in that column so that numbers have an
* at the beginning and at the end? So my results would look like this.

*11888*
*3623*
*1234*

andres a

Pre-pending and post-pending cell data in Excel
 
David:

you can do the following

Range("a2")= "*" & range("a2") & "*"

assume that the first row of data is in row a2
you will have to go over all cell to do the change.

Andres

-----Original Message-----
Question:

Is there a VB command or a way in Excel to prepend and

postpend data
in an Excel cell.

For example, let's say I have a column with the following

numbers

11888
3623
1234

How can I format all the cells in that column so that

numbers have an
* at the beginning and at the end? So my results would

look like this.

*11888*
*3623*
*1234*
.


Dave Peterson[_3_]

Pre-pending and post-pending cell data in Excel
 
See one other guess at your other post.


David Neustadt wrote:

Question:

Is there a VB command or a way in Excel to prepend and postpend data
in an Excel cell.

For example, let's say I have a column with the following numbers

11888
3623
1234

How can I format all the cells in that column so that numbers have an
* at the beginning and at the end? So my results would look like this.

*11888*
*3623*
*1234*


--

Dave Peterson



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com