View Single Post
  #11  
Old 02-08-2007, 01:41 AM
gajendra.gupta gajendra.gupta is offline
Registered User
 
Join Date: 19 Jan 2007
Location: Bangalore, India
Posts: 66
gajendra.gupta is becoming part of the community
This is even more simpler..

Sub Postal_Verify()
If Range("D1") Like "[A-Za-z][0-9][A-Za-z][0-9][A-Za-z][0-9]" Then
Range("A1") = Left(Range("A1"), 3) & " " & Right(Range("A1"), 3)
Else
MsgBox "Invalid Postal Code."
End If
End Sub

Regards,
Gajendra Gupta
Reply With Quote