Z
Zak
I have the following code, it some how has stopped working properly. The code
tells it if anything meets the given conditions in column E then it should
change the corresponding cell in column F accordingly, instead it changes
everything in column F to "AP" and "sub contractor".
please help. thanks.
Sub ReplaceWithAP()
Dim r As Range
Dim srng As Range
Set srng = Range("E2", Range("E" & Rows.Count). _
End(xlUp)).SpecialCells(xlCellTypeConstants, xlTextValues)
For Each r In srng
Select Case r.Value
Case "Hedra"
myvalue = "AP"
Case "iSOFT"
myvalue = "AP"
Case "Red Tray"
myvalue = "AP"
Case "System C"
myvalue = "AP"
Case "AMS Subcon"
myvalue = "Sub Contractor"
Case "Apollo"
myvalue = "Sub Contractor"
Case "Applabs"
myvalue = "Sub Contractor"
Case "Capula"
myvalue = "Sub Contractor"
Case "Temporary Staff"
myvalue = "Sub Contractor"
End Select
r.Offset(0, 1).Value = myvalue
Next
End Sub
tells it if anything meets the given conditions in column E then it should
change the corresponding cell in column F accordingly, instead it changes
everything in column F to "AP" and "sub contractor".
please help. thanks.
Sub ReplaceWithAP()
Dim r As Range
Dim srng As Range
Set srng = Range("E2", Range("E" & Rows.Count). _
End(xlUp)).SpecialCells(xlCellTypeConstants, xlTextValues)
For Each r In srng
Select Case r.Value
Case "Hedra"
myvalue = "AP"
Case "iSOFT"
myvalue = "AP"
Case "Red Tray"
myvalue = "AP"
Case "System C"
myvalue = "AP"
Case "AMS Subcon"
myvalue = "Sub Contractor"
Case "Apollo"
myvalue = "Sub Contractor"
Case "Applabs"
myvalue = "Sub Contractor"
Case "Capula"
myvalue = "Sub Contractor"
Case "Temporary Staff"
myvalue = "Sub Contractor"
End Select
r.Offset(0, 1).Value = myvalue
Next
End Sub