PC Review


Reply
Thread Tools Rate Thread

To assign list of number

 
 
obc1126
Guest
Posts: n/a
 
      20th Oct 2008


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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      20th Oct 2008
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" <(E-Mail Removed)> wrote in message
news:E716A78C-C049-4405-B34F-(E-Mail Removed)...
>
>
> 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 With Quote
 
obc1126
Guest
Posts: n/a
 
      21st Oct 2008
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" <(E-Mail Removed)> wrote in message
> news:E716A78C-C049-4405-B34F-(E-Mail Removed)...
> >
> >
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a number each letter on list compounding occurence @ each e =?Utf-8?B?TmF0IE1heHdlbGw=?= Microsoft Excel Worksheet Functions 4 27th Feb 2007 09:05 PM
List of Dates- Assign Week Number?? Micquia Microsoft Excel Misc 1 11th Jul 2006 09:58 PM
Assign one number to a number range =?Utf-8?B?U3Vl?= Microsoft Excel New Users 1 6th Oct 2005 01:21 AM
How do I assign contacts from my contact list in a new list =?Utf-8?B?Q2xhc3NpYw==?= Microsoft Outlook Contacts 2 12th Jan 2005 04:07 PM
Re: assign number value Jim Feaver Microsoft Excel Programming 1 5th Feb 2004 10:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 PM.