I have a 2 column range. In the the first column are job description
and in the second column the pay rate for that job description
Occasionally, I need to add a job desciption at the bottom of the lis
and I want the list to sort itself after I enter the new jo
description. I also want the pay rates to sort with the jo
descriptions at the same time. Below is the code I'm using. When I typ
a new job description and hit ENTER the following error shows.
Run-time error '1004':
Application-defined or Object-defined error
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Columns(1, 2).Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
End Sub
Many thanks
Case
--
Message posted from
http://www.ExcelForum.com