-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJEL_FORMAT
42 lines (33 loc) · 1.06 KB
/
JEL_FORMAT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Sub FormatJEL()
'For Help Contact Amanda Norseth, Ext 55459, Created for Employee Health 2020.04.03
'FOR COVID-19 RESPONSE--EMPLOYEE HEALTH RESPIRATORY COMPLIANCE REPORT
'Optimize Macro Speed
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
'DECLARE VARIABLES
Dim s3 As Worksheet
Dim lastrow As Integer
Dim rwr As Range
Dim row As Range
'SET DECLARED VARIABLES
Set s3 = Sheets("JEL")
lastrow = s3.Range("A1000").End(xlUp).row
Set rwr = s3.Range("A2:A" & lastrow)
'*********If employee cell empty, delete row***********
For Each row In rwr
On Error Resume Next
Columns("A").SpecialCells(xlBlanks).EntireRow.Delete
Next row
'***********Formatting JEL tab***************
'Select all in JEL and convert to number
Range("A2:O2", Range("A2:O2").End(xlDown).End(xlToRight)).Select
With Selection
.NumberFormat = "0"
.Value = .Value
End With
'Turn back on screen updating etc
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub