Identify employee and remove the rows.

soma34

New Member
Joined
May 5, 2008
Messages
32
Hi there,
For the problem i have, i thought a pivot table would work, but it doesnt. I will try explain as best as i can.

Column A - Task List (about 100 of them)
Column B - Monday
Column C - Hours
Column D - Tuesday
Column E - Hours
... and so on.

Under the "day" columns, we enter an employees name to allocate them to the task. There are 10 employees in total.


What I am trying to achieve?
Rather than each employee having the large list of tasks and having to find their name among the others, i would like a separate sheet for each employee that basically looks for their name and displays those lines in a nice table. So that each day they know just their tasks.

Attempts
1) I thought a pivot table would work, but because of the nature of the table, the pivot table results in layer upon layer and displays poorly.
2) I then did If statements which kind of worked, but its static in the sense that the resultant sheet will show just the one employees name and tasks, but wherever he is not allocated is obviously just a blank row. If an employee only has 5 tasks for the day, he has 95 blank rows throughout those tasks.

I hope ive explained it clearly. Any ideas?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
.
One example of workbook code :

Code:
Sub CopyInfo()
Dim wkSht As Worksheet
Dim cell As Range
Dim nextRow As Long
Dim lRow As Long
Dim i As Integer


Application.ScreenUpdating = False


lRow = Sheets("Data").Cells(Rows.Count, "A").End(xlUp).Row
For Each wkSht In Sheets
    Sheets("Data").Activate
    For i = 2 To lRow
        
        If Sheets("Data").Range("A" & i).Value = wkSht.Name Then
            Sheets("Data").Activate
            nextRow = wkSht.Range("A" & Rows.Count).End(xlUp).Row + 1
            Sheets("Data").Range("A" & i).EntireRow.Copy Destination:=wkSht.Range("A" & nextRow)
       End If
       
    Next i
Next wkSht


Application.ScreenUpdating = True
End Sub

Download file : https://www.amazon.com/clouddrive/share/awH3MxWvGa0hCPRQE98IM9flALWnzPZxCDcZPMKfevO

I don't know precisely how you envision the workbook layout. What you will find in the download file (zip) are two examples that
copy from the master sheet and paste to the appropriate tabs.

You can simply change the column headers to suit your needs and you'll have a complete project.
 
Upvote 0
Please explain more about what you want this:
Your words:
Nice Table to looks like.

Do you just want all the tasks listed in column A of the proper sheet?

Please give specific details

Like what is the sheet name of the Master sheet where you will initially entering these task.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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