Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with this code
I got assistance for this code from this forum, however it is not working the
way I had planned. it creates the index numbers in column a, however it does not sort column b alphabetically keeping rows c-g with the same row when sorted. Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "B1:B500" On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Me.Cells(.Row, "A").Value = Me.Cells(.Row - 1, "A").Value + 1 Me.Range("A:G").Sort key1:=Me.Range(B1), header:=xlYes End With End If ws_exit: Application.EnableEvents = True End Sub Any assistance would be appreciated |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |