Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default To assign list of number



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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default To assign list of number

Thanks, I'll try it out.


"Bob Phillips" wrote:

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




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
Assign a number each letter on list compounding occurence @ each e Nat Maxwell Excel Worksheet Functions 4 February 27th 07 09:05 PM
List of Dates- Assign Week Number?? Micquia Excel Discussion (Misc queries) 1 July 11th 06 09:58 PM
Assign one number to a number range Sue New Users to Excel 1 October 6th 05 01:21 AM
assign number value Jim Feaver Excel Programming 1 February 5th 04 10:24 PM
assign number value Bob Phillips[_6_] Excel Programming 0 February 5th 04 07:24 PM


All times are GMT +1. The time now is 02:18 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"