A CHALLENGING TASK, NEED HELP WITH THIS PROBLEM

Fimwizard

New Member
Joined
Mar 1, 2004
Messages
7
I created a payroll workbook that calculates the hours daily for each employee. The problem is that when it's time to make another workbook for the next payperiod I would like the terminated employee not to show and leave the current one. These pages are linked to other sheets, but not to other workbooks.

Sample:

Employee name Dept ID rate Status

John Doe 0002 0008 7.50
Jane Doe 0002 0001 8.50
Jimmy Doe 0002 1254 9.00 Term

So when the user saves and copies workbook only the current employees with their link data would remain in the new workbook
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
you can try something like this, Lets say their status is in column E.

Sub DeleteTerm()

dim x as long
dim LastRow as long

lastrow = range("A65536").end(xlup).row

for x = 1 to lastrow
if range("E" & x).value = "Term" then
rows(x & ":" & x).delete
else
end if
next x

end sub

Hope this helps

Jacob
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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