Is there a way to run the codes below on every sheet in my workbook?
Sub vs()
Dim Rng As Range
On Error Resume Next
Err.Clear
Application.EnableEvents = False
For Each Rng In Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues).Cells
If Err.Number = 0 Then
Rng.Value = StrConv(Rng.Text, vbUpperCase)
' Rng.Value = StrConv(Rng.Text, vbLowerCase)
' Rng.Value = StrConv(Rng.Text, vbProperCase)
End If
Next Rng
Application.EnableEvents = True
End Sub
or :
Public Sub Priority()
Dim s as String
Dim cell as Range
For Each cell In Selection
s = cell.Text
select case s
case "EXAMPLE 1"
Cell.Value = "EXAMPLE A"
case "EXAMPLE 2"
Cell.Value = "EXAMPLE B"
case "EXAMPLE 3"
Cell.Value = "EXAMPLE C"
case "EXAMPLE 4"
Cell.Value = "EXAMPLE D"
End Select
Next cell
End Sub
THANKS
Bookmarks