View Single Post
  #1   Report Post  
MrPetreli MrPetreli is offline
Junior Member
 
Posts: 7
Default UpperCase changes date format

I have a very unusual problem with the below code, which for some reason changes the date format on all cells in my spreadsheet from dd/mm/yyyy to mm/dd/yyyy. I tried to solve it but not luck with If x.Value = IsDate(x.Value) Then Exit Sub



Sub Uppercase()

Application.ScreenUpdating = False


' Loop to cycle through each cell in the specified range.
Set URange = Selection
For Each x In URange
' Change the text in the range to uppercase letters.
x.Value = UCase(x.Value)

If x.Value = IsDate(x.Value) Then Exit Sub

Next

End Sub