Sub Make_All_Caps_Just_4_Colums_3_Sheets()
Dim Rng1 As Range, rngArea As Range, i As Long, j As Long
Dim X()
Dim AppCalc As Long
Dim avarSheets, varItem, avarCols, varCol
Dim wks As Worksheet
avarSheets = Array("Desktops", "DCS", "Stock")
avarCols = Array("B", "F", "P", "AC")
With Application
AppCalc = .Calculation
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
For Each varItem In avarSheets
Set wks = Sheets(varItem)
For Each varCol In avarCols
On Error Resume Next
Set Rng1 = Intersect(wks.UsedRange, wks.Columns(varCol))
On Error GoTo 0
If Not Rng1 Is Nothing Then
X = Rng1
For i = 1 To UBound(X)
X(i, 1) = UCase$(X(i, 1))
Next i
End If
Rng1 = X
Next varCol
Next varItem
With Application
.ScreenUpdating = True
.Calculation = AppCalc
End With
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sub Color_Colum_P_Differentiate()
Dim rng As Range, cell As Range
Set rng = Range("P2:P" & Cells(65536, "E").End(xlUp).Row)
For Each cell In rng
If cell.Value <> "" Then
Select Case Trim(UCase(cell.Value))
Case Is = "DESKTOP"
cell.Interior.ColorIndex = 36
Case Is = "FREE SEAT"
cell.Interior.ColorIndex = 35
Case Is = "CDC LAPTOP"
cell.Interior.ColorIndex = 31
Case Is = "DCS"
cell.Interior.ColorIndex = 40
Case Is = "LAPTOP"
cell.Interior.ColorIndex = 38
Case Is = "NO IDEA"
cell.Interior.ColorIndex = 39
Case Is = "NO PC YET"
cell.Interior.ColorIndex = 15
Case Is = "PRINTER"
cell.Interior.ColorIndex = 41
Case Is = "TWIN USER"
cell.Interior.ColorIndex = 42
End Select
End If
Next cell
End Sub
|