ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   adding the same prefix or suffix to a range of cells (https://www.excelbanter.com/excel-discussion-misc-queries/34883-adding-same-prefix-suffix-range-cells.html)

Betty Turvy

adding the same prefix or suffix to a range of cells
 
How do you add the same prefix or suffix to a range of cells, without
changing the existing numbers in that range. ie. if you have these numbers
in a row of cells: 123 456 234 899
and you want them to read
PR123 PR456 PR234 PR899

I want to add this PR prefix to all these numbers in a row of cells, without
typing the prefix into each cell. Thank you.


Bill Martin -- (Remove NOSPAM from address)

Betty Turvy wrote:
How do you add the same prefix or suffix to a range of cells, without
changing the existing numbers in that range. ie. if you have these numbers
in a row of cells: 123 456 234 899
and you want them to read
PR123 PR456 PR234 PR899

I want to add this PR prefix to all these numbers in a row of cells, without
typing the prefix into each cell. Thank you.


--------------------------------

You can custom format the cell(s) to show PR at the front. It doesn't change
the actual contents of the cell the Excel knows about, but it does change what
is displayed on the screen to you.

1) Right click on a cell
2) Select Format Cells
3) Select Custom
4) There will be a bunch of custom formats in a window to the right.
Above them is a bar where you can type PR##########
5) Click OK

Bill

SheriTingle

Here's an option. Go to the Format menu and select cells. In the Format Cells
dialog box select the number tab. From the Category list on the left select
Custom. In the line that says Type: you type PR### and close the dialog box.

The PR will automatically be placed in any cell you format with this custom
format and the ### is a place holder for any three numbers.

To apply this, select the cells you want to format. Select Format, Cells and
on the number tab select Custom and find your custom format from the bottom
of the list on the right.

Good luck!

"Betty Turvy" wrote:

How do you add the same prefix or suffix to a range of cells, without
changing the existing numbers in that range. ie. if you have these numbers
in a row of cells: 123 456 234 899
and you want them to read
PR123 PR456 PR234 PR899

I want to add this PR prefix to all these numbers in a row of cells, without
typing the prefix into each cell. Thank you.


SheriTingle

Sorry, I didn't see that Bill had already answered your question. : )

"Betty Turvy" wrote:

How do you add the same prefix or suffix to a range of cells, without
changing the existing numbers in that range. ie. if you have these numbers
in a row of cells: 123 456 234 899
and you want them to read
PR123 PR456 PR234 PR899

I want to add this PR prefix to all these numbers in a row of cells, without
typing the prefix into each cell. Thank you.


Bill Martin -- (Remove NOSPAM from address)

Don't ever be sorry for offering help to someone... You done good ;-)

Bill
--------------------
SheriTingle wrote:
Sorry, I didn't see that Bill had already answered your question. : )

"Betty Turvy" wrote:


How do you add the same prefix or suffix to a range of cells, without
changing the existing numbers in that range. ie. if you have these numbers
in a row of cells: 123 456 234 899
and you want them to read
PR123 PR456 PR234 PR899

I want to add this PR prefix to all these numbers in a row of cells, without
typing the prefix into each cell. Thank you.


Michael

If the prefix or suffix is not going to be constant you could use the
Concatenate function. For example, if your data is in A1:D1, in cell E1 you
could type PR. Then in Cell A2 type =$E$1&A1 and copy to Cells B2:D2. You
could also simply type = "PR"&A1 in A2 and copy to B2:D2. Finally, copy
A2:D2 and edit/paste special/values in A1. However, this will change your
numbers to Text. HTH
--
Sincerely, Michael Colvin


"Betty Turvy" wrote:

How do you add the same prefix or suffix to a range of cells, without
changing the existing numbers in that range. ie. if you have these numbers
in a row of cells: 123 456 234 899
and you want them to read
PR123 PR456 PR234 PR899

I want to add this PR prefix to all these numbers in a row of cells, without
typing the prefix into each cell. Thank you.



All times are GMT +1. The time now is 09:57 PM.

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