Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Option Explicit
  2.  
  3. Sub UnfixedDate()
  4. Dim IroData
  5. IroData = "MMDD"
  6.  
  7. Dim WS_Count As Integer
  8. WS_Count = ActiveWorkbook.Worksheets.Count
  9.  
  10. Dim I As Integer
  11.  
  12. Dim cell
  13. Dim position
  14.  
  15. For I = 1 To WS_Count
  16. For Each cell In ActiveSheet.UsedRange.Cells
  17. position = InStr(1, cell.Value, IroData)
  18.  
  19. Do Until position = 0
  20. If position > 0 Then
  21. cell.Characters(position, Len(IroData)).Font.ColorIndex = 3
  22. position = InStr(position + 1, cell.Value, IroData)
  23. End If
  24. Loop
  25. Next
  26. Next I
  27. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement