Saturday, December 26, 2020

Change case in excel by vba

 Sub upper()

For Each cell In Selection
If Not cell.HasFormula Then
cell.Value = UCase(cell.Value)
End If
Next cell
End Sub


Sub proper()
For Each cell In Selection
If Not cell.HasFormula Then
cell.Value = Application.WorksheetFunction.proper(cell.Value)
End If
Next cell
End Sub



Sub lower()
For Each cell In Selection
If Not cell.HasFormula Then
cell.Value = LCase(cell.Value)
End If
Next cell
End Sub

No comments:

Post a Comment

THANKS FOR YOUR SUPPORT

Data copy paste on two another sheet with add row in google sheet by script

 function copyDataWithinWorkbook() {   var sourceSheetName = "Dashbord"; // Replace with the name of the source sheet   var target...