ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Add Text To Multiple cells (https://www.excelbanter.com/new-users-excel/31026-add-text-multiple-cells.html)

nmodafferi

Add Text To Multiple cells
 
I am working on this project & I cant figure out how to add a letter in front
of each number in a cell without clicking in to each individual cell and
typing it in. (very time consuming and tedious) The problem is - it's not all
the cells but a majority, all of the numbers are in the same column. To
explain, these are documents in storage. Each item is assigned a number (not
in any particular numerical order but they have to stay in the order they are.

Example:

X39655
X39656
X39711
39662
39664
39665

The last three numbers need the X in front of them.


Any ideas? Thanks so much!!


Don Guillett

something like this
for each c in selection
c.value="X"& c.value
next c

--
Don Guillett
SalesAid Software

"nmodafferi" wrote in message
...
I am working on this project & I cant figure out how to add a letter in

front
of each number in a cell without clicking in to each individual cell and
typing it in. (very time consuming and tedious) The problem is - it's not

all
the cells but a majority, all of the numbers are in the same column. To
explain, these are documents in storage. Each item is assigned a number

(not
in any particular numerical order but they have to stay in the order they

are.

Example:

X39655
X39656
X39711
39662
39664
39665

The last three numbers need the X in front of them.


Any ideas? Thanks so much!!




RagDyer

Add a "helper" column containing a text formula which will add your "X".
Then, you can delete the underlying formula in this helper column, leaving
the revised text behind.
You could then delete the original, if desired.

With data starting in A1, enter this in B1:

=IF(LEFT(A1)="X",A1,"X"&A1)

Then, drag down to copy, using the "fill handle",
OR
*Double click* the fill handle, to copy the formula in B1 down Column B, as
far as there is data in Column A.

Now, while the cells in Column B are *still* selected from the "copy", to
delete the formula, and leave the data behind:
Right click in the selection and choose "Copy".
Right click again, and choose "Paste Special".
Click in "Values", then <OK, then <Esc.

You could now delete the original data if you wish.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"nmodafferi" wrote in message
...
I am working on this project & I cant figure out how to add a letter in

front
of each number in a cell without clicking in to each individual cell and
typing it in. (very time consuming and tedious) The problem is - it's not

all
the cells but a majority, all of the numbers are in the same column. To
explain, these are documents in storage. Each item is assigned a number

(not
in any particular numerical order but they have to stay in the order they

are.

Example:

X39655
X39656
X39711
39662
39664
39665

The last three numbers need the X in front of them.


Any ideas? Thanks so much!!




All times are GMT +1. The time now is 12:29 PM.

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