We are using a SharePoint-exported Excel file for tracking Overtime. There are two aspects that influence this problem I am having:
- The employee shows they worked by entering Start Time in Column 'P'
- If overtime was planned but the employee did NOT work the OT, they leave the Cell in Column 'P' BLANK.
This could even be a setup error. I added a Module to the PERSONAL.xlsb VBAProject.
Then, I tried a bunch of code I found on here searching for similar cases but nothing seems to help.
I am using Excel 2016.
I tried numerous code but this seems the simplest:
Sub NewBlanks()
Dim LastRow As Integer
LastRow = Range("A" & Rows.Count).End(xlUp).row
Range("P2:P" & LastRow).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
I just want the macro to look at column 'P' and, if a cell is BLANK, delete the entire row, moving rows up to fill that gap.