LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
stats
 
Posts: n/a
Default comparison string VBA excell

Option Explicit
Sub auto_open()

Dim myRng As Range
Dim myCell As Range

Set myRng = Worksheets("sheet1").Range("a1:A1000")

For Each myCell In myRng.Cells
With myCell
.Offset(0, 2).Validation.Delete
If IsNumeric(.Value) _
And .Text Like "#.#" Then
With .Offset(0, 2)
.Value = ""
With .Validation
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="Yes,No"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End With
End If
End With
Next myCell
End Sub

the above code checks if the format of the Column A is of the format
integer.integer (2.2)
how do i check the format integer.integer.integer.integer (2.2.2.2)
i tried #.#.#.# it did not work

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse File for Mac John Vickers Excel Discussion (Misc queries) 1 February 17th 06 06:23 PM
Auto convert an alphanumeric string (CIS9638S) to numbers only? Gary L Brown Excel Worksheet Functions 1 September 7th 05 01:17 AM
Excell deletes 0 when its the first number in a string dustin1138 Excel Discussion (Misc queries) 2 May 7th 05 09:08 PM
lable ranges in Excell david Excel Discussion (Misc queries) 2 February 2nd 05 11:26 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"