Ok
This is the code that you need.
Right click on your sheet name at the bottom of excel. Select view code. Paste this and close rhe window
Wherever you type your codes on that sheet, the codes will be changed to the text Detailed below
The code is easy to modify so........................
Enjoy.
Public changeflag As Integer
Dim temp, temp2 As String
Private Sub Worksheet_Change(ByVal Target As Range)
If changeflag = 1 Then GoTo 10
changeflag = 1
codes = Array("af", "AF", "cf", "CF", "wf", "WF")
CODES2 = Array("African Food", "AFRICAN FOOD", "Chineese Food", "CHINEESE FOOD", "Western Food", "WESTERN FOOD")
If Target.Cells.Count > 1 Or InStr(Join(codes), temp) = 0 Or Len(Target.Cells.Value) > 2 Then GoTo 10
Range(Target.Cells.Address).FormulaR1C1 = CODES2((InStr(Join(codes), Target.Cells.Value) - 1) / 3)
10 changeflag = 0
End Sub
Bookmarks