ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Prefix in every cell (https://www.excelbanter.com/excel-discussion-misc-queries/193876-prefix-every-cell.html)

Mike Busch[_2_]

Prefix in every cell
 
I would like to place a prefix for suffix in every cell, either or. I need to
place a part number that starts with the same tow letters, say PL, and then I
would like to only type in the part number but have the prefix in the same
cell, exp. type in 097886 and have PL097886 appear in the cell. Is this
do-able. Thanks in advance.

Don Guillett

Prefix in every cell
 
Right click sheet tabview codeinsert thischange range to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("f2:f22")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Value = "PL" & Target
Application.EnableEvents = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mike Busch" wrote in message
...
I would like to place a prefix for suffix in every cell, either or. I need
to
place a part number that starts with the same tow letters, say PL, and
then I
would like to only type in the part number but have the prefix in the same
cell, exp. type in 097886 and have PL097886 appear in the cell. Is this
do-able. Thanks in advance.



Mike H

Prefix in every cell
 
Hi,

Select the cell(s) and then
Format|Cells
Select the Number Tab
Select Custom
Enter a cusytom format of PL#000000

Mike
"Mike Busch" wrote:

I would like to place a prefix for suffix in every cell, either or. I need to
place a part number that starts with the same tow letters, say PL, and then I
would like to only type in the part number but have the prefix in the same
cell, exp. type in 097886 and have PL097886 appear in the cell. Is this
do-able. Thanks in advance.


Dave Peterson

Prefix in every cell
 
You could give the cell a custom format:
"PL"000000
(it'll always show at least 6 digits)



Mike Busch wrote:

I would like to place a prefix for suffix in every cell, either or. I need to
place a part number that starts with the same tow letters, say PL, and then I
would like to only type in the part number but have the prefix in the same
cell, exp. type in 097886 and have PL097886 appear in the cell. Is this
do-able. Thanks in advance.


--

Dave Peterson

Jim L

Prefix in every cell
 
Mike everyone has their own preferences, I don't like to format the data to
show "PL"+ plus the number, but to actually create a new column with the
PL012345 part number. I would enter you part numbers in column A and then in
column B enter the formula ="PL"&A1 so column B shows the alpha numeric
part number.

Also since you are entering parts with leading zeros, be sure to format
column A to Text before starting so Excel doesn't 'help' you and remove the
leading zero.


"Mike Busch" wrote:

I would like to place a prefix for suffix in every cell, either or. I need to
place a part number that starts with the same tow letters, say PL, and then I
would like to only type in the part number but have the prefix in the same
cell, exp. type in 097886 and have PL097886 appear in the cell. Is this
do-able. Thanks in advance.



All times are GMT +1. The time now is 05:17 AM.

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