To assign list of number
Public Sub ProcessData()
Dim i As Long
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To LastRow
Select Case Left$(.Cells(i, "B").Value, 2)
Case "01": .Cells(i, "C").Value = "Project"
Case "02": .Cells(i, "C").Value = "Others"
Case "07": .Cells(i, "C").Value = "Quality"
Case "09": .Cells(i, "C").Value = "Functional"
End Select
Next i
End With
End Sub
--
__________________________________
HTH
Bob
"obc1126" wrote in message
...
I have a range of date which consists of Job number & cost code. I want to
assign the Job Description based on the job number & cost code. What i did
before is to manually fill in the Job description, which is kind of
wasting
time when the list is long. Is there a code to automate this process?
Job Number Cost Code Job Description
A120-BDL 01-A120-BD Project
9000-000 07-9001-000 Quality
9000-000 09-9002-000 Functional
A291-ARL 01-3000-000 Project
A120-BDL 01-A120-BD Project
A291-ARL 01-3000-000 Project
9000-000 07-9001-000 Quality
9000-000 09-9002-000 Functional
A120-BDL 01-A120-BD Project
A291-ARL 01-3000-000 Project
9000-000 07-9001-000 Quality
9000-000 09-9002-000 Functional
9000-000 02-9001-000 Others
A120-BDL 01-A120-BD Project
A291-ARL 01-3000-000 Project
9000-000 07-9001-000 Quality
9000-000 09-9002-000 Functional
9000-000 01-9001-000 Others
9000-000 09-9002-000 Functional
8666-FDL 02-8666-FD Project
|