모듈을 추가하여 아래 부분을 복사해 넣으시고 매크로를 선택하여 실행 하시면 됩니다.
Dim 행값, 행ys As String
Dim i, j, k As Integer
Dim Hys, ysH, Ys As String
Sub 대문자로()
On Error Resume Next
For i = 1 To Selection.Rows.Count
For k = 1 To Selection.Columns.Count
Selection.Cells(i, k) = UCase(Selection.Cells(i, k))
Next k
Next i
End Sub
Sub 소문자로()
On Error Resume Next
For i = 1 To Selection.Rows.Count
For k = 1 To Selection.Columns.Count
Selection.Cells(i, k) = LCase(Selection.Cells(i, k))
Next k
Next i
End Sub
Sub 대소소로()
On Error Resume Next
For i = 1 To Selection.Rows.Count
For k = 1 To Selection.Columns.Count
행값 = Selection.Cells(i, k)
행값 = Trim(LCase(행값))
For j = 1 To Len(행값)
If Mid(행값, j, 1) >= "a" And Mid(행값, j, 1) <= "z" Then
Mid(행값, j, 1) = UCase(Mid(행값, j, 1))
Selection.Cells(i, k) = 행값
Exit For
End If
Next j
Next k
Next i
End Sub
Sub 대소대소로()
On Error Resume Next
For i = 1 To Selection.Rows.Count
For k = 1 To Selection.Columns.Count
행값 = Selection.Cells(i, k)
행값 = Trim(LCase(행값))
행ys = 행값
For j = 2 To Len(행값)
Hys = Mid(행값, j - 1, 1)
Ys = Mid(행값, j, 1)
If (Hys < "a" Or Hys > "z") And (Ys >= "a" Or Ys <= "z") Then
Mid(행ys, j, 1) = UCase(Mid(행ys, j, 1))
End If
Next j
'---------------------------------
Ys = Mid(행값, 1, 1)
If (Ys >= "a" Or Ys <= "z") Then
Mid(행ys, 1, 1) = UCase(Ys)
End If
Selection.Cells(i, k) = 행ys
'---------------------------------
Next k
Next i
End Sub
첫댓글 유용합니다. 매우
매크로 편집-> 모듈 삽입하여 상기 매크로를 붙여넣기하고 실행 시키면 됩니다.