Edward
Make sure you change the sheet references to match your situation. I don't
know how your sheets are named, but if the sheet with the data is named
DATA, then that line will read
If Sheets("DATA").Range("A65536").End(xlUp).Address = $A$1 Then
--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.
"E. Kohl" wrote in message
...
Dick,
I replaced the line with the new code but I now get a "Compile Error:
Syntax error" and the debugger highlights the first line of the new
lines:
If Sheet1.Range("A65536").End(xlUp).Address = $A$1 Then
Also, when I copied and pasted the new lines into the module window, the
font color of the first line automatically changed to red.
Regarding your other points, the worksheet contains data from A2 to G17
with the header in A1 to G1.
Thanks a lot for the explanation on Range("A2").End(xlDown), etc. I'm
slowly starting to get a feel for what the code means. Thanks again,
Edward
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!