Hello helpful, smart people,
The only way I could overwrite 1 and 10 differently was with If statements. Now I am getting an error on [rangeArray(i).Select]. Why though? I am not that smart in VBA so any fixing this would be fanFreakntasticly appreciated. Summary goal: Go through columns P,U,V,W and replace numbers.
[code]
Sub ReplaceReasonForVisit()
Const yy As Integer = 3
Dim rangeArray(yy) As Range
Set rangeArray(0) = Sheet1.Range("P:P")
Set rangeArray(1) = Sheet1.Range("U:U")
Set rangeArray(2) = Sheet1.Range("V:V")
For i = 0 To (yy - 1)
rangeArray(i).Select
Next i
If ActiveCell.Value = "1" Then
ActiveCell.Value = "Change Toner"
End If
If ActiveCell.Value = "2" Then
ActiveCell.Value = "Copy Quality"
End If
If ActiveCell.Value = "3" Then
ActiveCell.Value = "Customer Care"
End If
If ActiveCell.Value = "4" Then
ActiveCell.Value = "Installation/Moves/Removals"
End If
If ActiveCell.Value = "5" Then
ActiveCell.Value = "(Emergency) Supply Orders"
End If
If ActiveCell.Value = "6" Then
ActiveCell.Value = "Error Code"
End If
If ActiveCell.Value = "7" Then
ActiveCell.Value = "Fax Issue"
End If
If ActiveCell.Value = "8" Then
ActiveCell.Value = "Paper Jam"
End If
If ActiveCell.Value = "9" Then
ActiveCell.Value = "Network Issue"
End If
If ActiveCell.Value = "10" Then
ActiveCell.Value = "Malfunction"
End If
If ActiveCell.Value = "11" Then
ActiveCell.Value = "UPrint/Pharos System"
End If
If ActiveCell.Value = "12" Then
ActiveCell.Value = "Preventative Maintenance"
End If
If ActiveCell.Value = "13" Then
ActiveCell.Value = "Waste Toner"
End If
If ActiveCell.Value = "14" Then
ActiveCell.Value = "Training"
End If
If ActiveCell.Value = "15" Then
ActiveCell.Value = "Meter Reads"
End If
If ActiveCell.Value = "16" Then
ActiveCell.Value = "Walk-through"
End If
If ActiveCell.Value = "17" Then
ActiveCell.Value = "Data Correction"
End If
If ActiveCell.Value = "18" Then
ActiveCell.Value = "Other"
End If
End Sub
[\code]
Eternally grateful, Monika
Bookmarks