Hi,
I am a bit new with macros, and I was hoping you guys can help me with my problem so I joined in.
Here it is:
I have a payroll sheet with several columns. The rows are divided into two parts, for office employees and for sales personnel. (Please see attached file.)
More often, there will always be new employees added to the roster. I've recorded a macro that adds new rows for new employees and automatically copies the formulas from the rows above. After the new rows have been inserted, the basic information for the new employee have to be filled in (name, salary rate, etc.). What I wanted to do was to automatically sort the table using the last names of the employees after I've filled in the necessary info for the newly-added ones. I recorded a macro that sorts (for example) all office employees (using last names) from A-Z. Problem is, after I've added the new employee and run the macro, it only sorts up to the row that I've originally selected when I recorded the macro. Basically, my problem here is on the rage. I think the macro fixed the range. I've read one post here about "Using Sort function in macro crashes". It's a bit similar to my problem. I can opt to use the long range you suggested there, but I am hampered by the fact that the rows are categorized into two and I figured the long range wouldn't do for the office employees category (please see attached file).
Simply put it, I just want that after I've added new rows for new employees and filled in the necessary info, I can run a macro that sorts out the employees by their last names from A-Z.
Hope you can help me out. Thanks!
Bookmarks