Article ID: 107139
Article Last Modified on 10/10/2006
Sub UpperMonth()
Dim Cell As Object 'Declare the Cell variable.
For Each Cell In Selection
' If the cell is blank or a text string, then
' skip to the next cell in the selection.
If Cell.Value <> "" And Val(Cell.Value) > 0 Then
'Format the cell as text in a 'mmm' number format,
'and change it to uppercase.
Cell.Value = UCase(Format(Cell.Value, "mmm"))
End If
Next
End Sub
=UPPER(TEXT(cell_ref,"mmm"))where cell_ref is the cell that contains the date.
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 5.00a 5.00c 7.00a XL98 XL97 XL7 XL5 XL
Keywords: kbdtacode kbhowto kbprogramming KB107139