Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
assign number value
Hi Tim:
This worksheet_change event procedure works for column K. Adjust the isect range to whatever column(s) you need.. Private Sub Worksheet_Change(ByVal target As Range) Dim isect As Range, c As Range On Error GoTo Cleanup Set isect = intersect(target, Range("K:K")) If Not (isect Is Nothing) Then Application.EnableEvents = False For Each c In isect If c.Value < "" Then c.Value = 0 End If Next c End If Cleanup: Application.EnableEvents = True End Sub hth, Jim Feaver "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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I assign a number to a name in another column? | 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 | |||
assign number value | Excel Programming |