Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
assign number value
Tim,
This works on column 1 Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False On Error GoTo ws_exit With Target If .Column = 1 Then If Not IsNumeric(.Value) Then .Value = "" End If End If End With ws_exit: Application.EnableEvents = True End Sub Put it in the appropriate worksheet code module. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tim" wrote in message ... I would like to make a column reject anything other than a number for the column. If a word is put in there by a macro excel sees it is not a number and replaces it with a 0 or blank. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I assign a different value to a number (for ranking)? | Excel Discussion (Misc queries) | |||
Assign a number to a word | Excel Worksheet Functions | |||
Can I assign a number to a name and use the name in a sum? | Excel Discussion (Misc queries) | |||
Assign one number to a number range | New Users to Excel | |||
Assign a number to a name | Excel Worksheet Functions |