Remove >70% efficiency from employee report

DPARDY

New Member
Joined
Dec 3, 2009
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Thank you in advance for your time and help.

I have a spreadsheet that I export daily from our system and I have got it to this point. My next step that I am tiring to do is, everyone that has a greater than 70% efficiency (column S), I want to remove/hide all their info from the file. The problem I am having is that the number of jobs varies day to day per person with 50+ employees.

Thanks again.

LR_EmployeeEfficiency.jpg
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Could you provide a copy of your sheet using the XL2BB add in, or alternatively share your file via Google Drive, Dropbox or similar file sharing platform?
 
Upvote 0
Please try the following on a copy of your worksheet. Run the macro with the sheet active.
VBA Code:
Option Explicit
Sub Test()
    Dim i As Long
    For i = Cells(Rows.Count, 19).End(xlUp).Row To 8 Step -1
        If Cells(i, 19) > 0.7 Then
            Rows(i).Hidden = True
            i = i - 1
            Do While WorksheetFunction.CountA(Range(Cells(i, 2), Cells(i, 12))) <> 0 And Cells(i, 2) <> "Job"
                Rows(i).Hidden = True
                i = i - 1
            Loop
        End If
    Next i
End Sub
 
Upvote 0
Please try the following on a copy of your worksheet. Run the macro with the sheet active.
VBA Code:
Option Explicit
Sub Test()
    Dim i As Long
    For i = Cells(Rows.Count, 19).End(xlUp).Row To 8 Step -1
        If Cells(i, 19) > 0.7 Then
            Rows(i).Hidden = True
            i = i - 1
            Do While WorksheetFunction.CountA(Range(Cells(i, 2), Cells(i, 12))) <> 0 And Cells(i, 2) <> "Job"
                Rows(i).Hidden = True
                i = i - 1
            Loop
        End If
    Next i
End Sub
kevin9999,

This is what happened, it hid just about everything.

LR_EmployeeEfficiency 1.jpg
 
Upvote 0
OK, then back to post #2. I'll really need your actual sheet before I can look at this further.
 
Upvote 0

Here is a link, thank you.
 
Upvote 0
Thank you for that. The issue was the custom formatting you have on the % figures. The code below had been adjusted for that:
VBA Code:
Option Explicit
Sub Test_2()
    Dim i As Long
    For i = Cells(Rows.Count, 19).End(xlUp).Row To 8 Step -1
        If Cells(i, 19) > 70 Then
            Rows(i).Hidden = True
            i = i - 1
            Do While WorksheetFunction.CountA(Range(Cells(i, 2), Cells(i, 12))) <> 0 And Cells(i, 2) <> "Job"
                Rows(i).Hidden = True
                i = i - 1
            Loop
        End If
    Next i
End Sub

Leading to, before:
LR_EmployeeEfficiency TEST.xlsx
ABCDEFGHIJKLMNOPQRST
1
220-Dec-23 02:52PMEmployee Efficiency
3
4From 12/19/2023 Thru 12/19/2023
5
6
7SetupRun
8JobWC OperEst HrsAdj E HrsAct Hrs% EffQtyEst HrsAdj E HrsAct Hrs% Eff
9Employee:133SMITH, JANE
10136590VARIAXIS-1MACHINED VALVE BODY 3" Y-PATT100/ea5.600%
11136737PTH-6800-1COUPLING MACHINING1016/ea19.002.532.40106%
12202312OH500.000.002.000%0/ea
13Employee Total: 0.002.000%2.538.0032%
14Total Eff:25.3%
15
16Employee:134BOND, JAMES
17136231PTH-6800-2CAM SUPORT, VE, FR, LT101/ea165.002.754.0069%
18136315PTH-6800-2YOKE MOUNT202/ea73.501.401.00140%
19136720PTH-6800-1HINGE, DOOR SD, CHRG, L/R204.002.403.0080%6/ea13.802.303.0077%
20202312DOWNTIME300.000.003.000%0/ea
21Employee Total: 2.406.0080%6.458.0081%
22Total Eff:80.5%
23
24Employee:137WICK, JOHN
25136625TC-MY250HUB702.001.001.5067%1/ea2.001.575.5029%
26202312DOWNTIME300.000.003.000%0/ea
27Employee Total: 1.004.5022%1.575.5029%
28Total Eff:25.7%
29
30
31Report Total:24.7041.4959.5%191.38225.8484.7%
32
33Total Shop Hours:267.33
34Shop Efficiency:80.8%
Sheet1 (2)


After:
LR_EmployeeEfficiency TEST.xlsx
ABCDEFGHIJKLMNOPQRST
1
220-Dec-23 02:52PMEmployee Efficiency
3
4From 12/19/2023 Thru 12/19/2023
5
6
7SetupRun
8JobWC OperEst HrsAdj E HrsAct Hrs% EffQtyEst HrsAdj E HrsAct Hrs% Eff
9Employee:133SMITH, JANE
10136590VARIAXIS-1MACHINED VALVE BODY 3" Y-PATT100/ea5.600%
11136737PTH-6800-1COUPLING MACHINING1016/ea19.002.532.40106%
12202312OH500.000.002.000%0/ea
13Employee Total: 0.002.000%2.538.0032%
14Total Eff:25.3%
15
23
24Employee:137WICK, JOHN
25136625TC-MY250HUB702.001.001.5067%1/ea2.001.575.5029%
26202312DOWNTIME300.000.003.000%0/ea
27Employee Total: 1.004.5022%1.575.5029%
28Total Eff:25.7%
29
30
31Report Total:24.7041.4959.5%191.38225.8484.7%
32
33Total Shop Hours:267.33
34Shop Efficiency:80.8%
Sheet1 (2)
 
Upvote 0
Thank you for that. The issue was the custom formatting you have on the % figures. The code below had been adjusted for that:
VBA Code:
Option Explicit
Sub Test_2()
    Dim i As Long
    For i = Cells(Rows.Count, 19).End(xlUp).Row To 8 Step -1
        If Cells(i, 19) > 70 Then
            Rows(i).Hidden = True
            i = i - 1
            Do While WorksheetFunction.CountA(Range(Cells(i, 2), Cells(i, 12))) <> 0 And Cells(i, 2) <> "Job"
                Rows(i).Hidden = True
                i = i - 1
            Loop
        End If
    Next i
End Sub

Leading to, before:
LR_EmployeeEfficiency TEST.xlsx
ABCDEFGHIJKLMNOPQRST
1
220-Dec-23 02:52PMEmployee Efficiency
3
4From 12/19/2023 Thru 12/19/2023
5
6
7SetupRun
8JobWC OperEst HrsAdj E HrsAct Hrs% EffQtyEst HrsAdj E HrsAct Hrs% Eff
9Employee:133SMITH, JANE
10136590VARIAXIS-1MACHINED VALVE BODY 3" Y-PATT100/ea5.600%
11136737PTH-6800-1COUPLING MACHINING1016/ea19.002.532.40106%
12202312OH500.000.002.000%0/ea
13Employee Total: 0.002.000%2.538.0032%
14Total Eff:25.3%
15
16Employee:134BOND, JAMES
17136231PTH-6800-2CAM SUPORT, VE, FR, LT101/ea165.002.754.0069%
18136315PTH-6800-2YOKE MOUNT202/ea73.501.401.00140%
19136720PTH-6800-1HINGE, DOOR SD, CHRG, L/R204.002.403.0080%6/ea13.802.303.0077%
20202312DOWNTIME300.000.003.000%0/ea
21Employee Total: 2.406.0080%6.458.0081%
22Total Eff:80.5%
23
24Employee:137WICK, JOHN
25136625TC-MY250HUB702.001.001.5067%1/ea2.001.575.5029%
26202312DOWNTIME300.000.003.000%0/ea
27Employee Total: 1.004.5022%1.575.5029%
28Total Eff:25.7%
29
30
31Report Total:24.7041.4959.5%191.38225.8484.7%
32
33Total Shop Hours:267.33
34Shop Efficiency:80.8%
Sheet1 (2)


After:
LR_EmployeeEfficiency TEST.xlsx
ABCDEFGHIJKLMNOPQRST
1
220-Dec-23 02:52PMEmployee Efficiency
3
4From 12/19/2023 Thru 12/19/2023
5
6
7SetupRun
8JobWC OperEst HrsAdj E HrsAct Hrs% EffQtyEst HrsAdj E HrsAct Hrs% Eff
9Employee:133SMITH, JANE
10136590VARIAXIS-1MACHINED VALVE BODY 3" Y-PATT100/ea5.600%
11136737PTH-6800-1COUPLING MACHINING1016/ea19.002.532.40106%
12202312OH500.000.002.000%0/ea
13Employee Total: 0.002.000%2.538.0032%
14Total Eff:25.3%
15
23
24Employee:137WICK, JOHN
25136625TC-MY250HUB702.001.001.5067%1/ea2.001.575.5029%
26202312DOWNTIME300.000.003.000%0/ea
27Employee Total: 1.004.5022%1.575.5029%
28Total Eff:25.7%
29
30
31Report Total:24.7041.4959.5%191.38225.8484.7%
32
33Total Shop Hours:267.33
34Shop Efficiency:80.8%
Sheet1 (2)
That worked like a charm, but I tired it on a full list and what I am getting is when there is a group of >70 together I am ending up with a group of blank rows together. What would I need to change to have it include one more row up or down to be hidden as well? Example file row 15 or 23.

Thanks Kevin.
 
Upvote 0
Understood (y)
Please try the following:
VBA Code:
Option Explicit
Sub Test_3()
    Dim i As Long
    For i = Cells(Rows.Count, 19).End(xlUp).Row To 8 Step -1
        If Cells(i, 19) > 70 Then
            Rows(i).Hidden = True
            i = i - 1
            Do While WorksheetFunction.CountA(Range(Cells(i, 2), Cells(i, 12))) <> 0 And Cells(i, 2) <> "Job"
                Rows(i).Hidden = True
                If WorksheetFunction.CountA(Rows(i - 1)) = 0 Then Rows(i - 1).Hidden = True
                i = i - 1
            Loop
        End If
    Next i
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,215,131
Messages
6,123,223
Members
449,091
Latest member
jeremy_bp001

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