Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Fixed it... Thanks again for all your help Merjet!
-- Dan Sub Clean_Data_File() Dim iEnd As Long Dim ws As Worksheet Dim c As Range Dim rng As Range Dim iCt As Integer Application.ScreenUpdating = False Set ws = ActiveSheet iEnd = ws.Cells(65536, 19).End(xlUp).Row Set rng = ws.Range(ws.Cells(3, 19), Cells(iEnd, 19)) For Each c In rng If InStr(c, "/") = False Then _ c = Mid(c, 4, 2) & "/" & Mid(c, 6, 2) _ & "/" & "20" & Mid(c, 2, 2) Next c iEnd = ws.Cells(65536, 20).End(xlUp).Row Set rng = ws.Range(ws.Cells(3, 20), Cells(iEnd, 20)) For Each c In rng If InStr(c, "/") = False Then _ c = Mid(c, 4, 2) & "/" & Mid(c, 6, 2) _ & "/" & "20" & Mid(c, 2, 2) Next c iEnd = ws.Cells(65536, 16).End(xlUp).Row Set rng = ws.Range(ws.Cells(3, 16), Cells(iEnd, 16)) For Each c In rng If InStr(c, "-") = False Then _ c = Mid(c, 5, 2) & "-" & Mid(c, 1, 3) _ & "-" & Mid(c, 8, 4) Next c Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clearing Check Boxes & Running a diff Macro when unchecking the ch | Excel Discussion (Misc queries) | |||
How to check a cell for content before running macro. | Excel Programming | |||
How to Check if a Process is Running | Excel Programming | |||
check for running app | Excel Programming | |||
Check for Excel version before running? | Excel Programming |