-
Welcome to VBAX
[vba]
Option Explicit
Sub Test()
Dim Rng As Long
Dim Cel As Range
On Error Resume Next
Rng = Worksheets("NovusDR").Range("AE7")
For Each Cel In Range("Z7").Resize(Rng)
Select Case Len(Cel)
Case 5
Cel.NumberFormat = "m/d/yyyy"
Case 1
Cel.NumberFormat = "0"
End Select
Next
End Sub
[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules