View Single Post
  #3 (permalink)  
Old June 10th, 2008, 10:34 AM
ptrussell2009 ptrussell2009 is offline
Registered User
 
Join Date: Jun 2008
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I actually have figured it out, BUT i only know how to do it one cell at a time. These are the objects in the drop down list and their corresponding values:


Environment Impact Cycle
xDE=1 1=1 ITC1=1
xDV=2 2=2 ITC2=2
xO1=3 3=3 PR1=3
xOQ=4 4=4 PR2=4
xOV=5 5=5
xR1=6
xRB=7
xRP=8
xSB=9
xTO=10
xTS=11

Here is how I have been doing it one at a time(Im not worried about adding the Cycle field right now thats why its not in the code):

Sub Priority()
Dim temp As Integer

With ActiveSheet

If .Range("H9") = ("xDE") Then
temp = 1
End If
If .Range("H9") = ("xDV") Then
temp = 2
End If
If .Range("H9") = ("xO1") Then
temp = 3
End If
If .Range("H9") = ("xOQ") Then
temp = 4
End If
If .Range("H9") = ("xOV") Then
temp = 5
End If
If .Range("H9") = ("xR1") Then
temp = 6
End If
If .Range("H9") = ("xRB") Then
temp = 7
End If
If .Range("H9") = ("xRP") Then
temp = 8
End If
If .Range("H9") = ("xSB") Then
temp = 9
End If
If .Range("H9") = ("xTO") Then
.Range("O17") = 10
End If
If .Range("H9") = ("xTS") Then
temp = 11
End If

'............IMPACT..............
If .Range("I9") = ("1") Then
temp2 = 1
End If
If .Range("I9") = ("2") Then
temp2 = 2
End If
If .Range("I9") = ("3") Then
temp2 = 3
End If
If .Range("I9") = ("4") Then
temp2 = 4
End If
If .Range("I9") = ("5") Then
temp2 = 5
End If

'......test.............
.Range("F9") = temp + temp2

End With
End Sub


Ive been working on something like this so that I can do it for more than just one cell.I need it to work for about 1000.


Last_Row = Range("H1000").End(xlUp).Row

For H = 1 To Last_Row
If Cells(H, 1) = ("xDE") Then
   Cells(H, 2) = 1

End If
Next H



Reply With Quote