Sorting payroll worksheet alphabetically using VBA

jeevesk

New Member
Joined
Jul 16, 2016
Messages
1
[FONT=&quot]Hi,

I have almost no knowledge of VBA, and need help with this.

I have a payroll spreadsheet with monthly worksheets containing employee codes, names, hours worked per day, overtime calculations, Sunday pay calculations, etc. I need help with the ffg:[/FONT]

[FONT=&quot] [/FONT]
[FONT=&quot]1. For every month's worksheet I need to delete the employees that were terminated the previous month, and add in any new employees and then sort the sheet alphabetically by employee code. How would I do this?[/FONT]
[FONT=&quot]2. Overtime for last month is paid this month, so when the new month's sheet is sorted alphabetically as above, I need to find the relevant employees overtime from last month and pull it across to a cell in this month's sheet, considering that the cell references need to change according to the mentioned deletion and addition of employees.
3. There are several cells in the current month that lookup cells on the previous month's sheet, I need a macro to find and replace the reference names, eg. May!2016 to June!2016 on the newly created worksheet.

Thank you in advance for your assistance.

Kind regards,
JeevesK [/FONT]
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top