#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increment cell prefix Brettjg Excel Discussion (Misc queries) 2 April 27th 07 09:08 AM
Automatically prefix cell entry rossinvrland Excel Worksheet Functions 5 January 4th 07 09:23 PM
cell prefix Johno313 Excel Discussion (Misc queries) 4 June 20th 06 10:35 AM
Country Prefix in same cell Ely Excel Discussion (Misc queries) 3 December 30th 05 12:09 AM
Cell value prefix NDB Excel Worksheet Functions 4 February 1st 05 03:06 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"