One more thing.
I was given an awesome macro that serves my purpose, with the exception of shifting all the data to row 5. Can you see if you could incorporate the NoBlks() with Import()...goal is to have NoBlks() become the very last task in Import()? I am a laughably pathetic novice.
Option Explicit
Sub Import()
Dim fName As String, fPath As String, fPathDone As String
Dim LR As Long, NR As Long
Dim wbData As Workbook, wsMaster As Worksheet
'Setup
Application.ScreenUpdating = False 'speed up macro execution
Application.EnableEvents = False 'turn off other macros for now
Application.DisplayAlerts = False 'turn off system messages for now
Set wsMaster = ThisWorkbook.Sheets("Data") 'sheet report is built into
With wsMaster
If MsgBox("Clear the old data first?", vbYesNo) = vbYes Then
.Cells.Clear
NR = 1
Else
NR = .Range("A" & .Rows.Count).End(xlUp).Row + 1 'appends data to existing data
End If
'Path and filename (edit this section to suit)
MsgBox "Please select a folder with files to consolidate"
Do
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.Show
If .SelectedItems.Count > 0 Then
fPath = .SelectedItems(1) & "\"
Exit Do
Else
If MsgBox("No folder chosen, do you wish to abort?", _
vbYesNo) = vbYes Then Exit Sub
End If
End With
Loop
fPathDone = fPath & "Archived\" 'remember final \ in this string
On Error Resume Next
MkDir fPathDone 'creates the completed folder if missing
On Error GoTo 0
fName = Dir(fPath & "*.xls*") 'listing of desired files, edit filter as desired
'Import a sheet from found files
Do While Len(fName) > 0
If fName <> ThisWorkbook.Name Then 'don't reopen this file accidentally
Set wbData = Workbooks.Open(fPath & fName) 'Open file
'This is the section to customize, replace with your own action code as needed
With wbData.Sheets("JobData")
LR = .Range("A" & .Rows.Count).End(xlUp).Row 'Find last row
If NR = 1 Then 'copy the data AND titles
.Range("A1:A" & LR).EntireRow.Copy
Else 'copy the data only
.Range("A2:A" & LR).EntireRow.Copy
End If
End With
.Range("A" & NR).PasteSpecial xlPasteValues 'paste values into master
wbData.Close False 'close file
NR = .Range("A" & .Rows.Count).End(xlUp).Row + 1 'Next row
Name fPath & fName As fPathDone & fName 'move file to IMPORTED folder
fName = Dir 'ready next filename
End If
Loop
End With
ErrorExit: 'Cleanup
ActiveSheet.Columns.AutoFit
Application.DisplayAlerts = True 'turn system alerts back on
Application.EnableEvents = True 'turn other macros back on
Application.ScreenUpdating = True 'refreshes the screen
End Sub
__________________________________
Sub NoBlks()
Dim Lastrow As Long, i As Long, j As Integer
Application.ScreenUpdating = False
With ActiveSheet
For j = 1 To 16
Lastrow = .Cells(Rows.Count, j).End(xlUp).Row
For i = Lastrow To 5 Step -1
'If (IsEmpty(.Cells(i, j).Value)) Then .Cells(i, j).Delete shift:=xlShiftUp
If (.Cells(i, j).Value = "") Then .Cells(i, j).Delete shift:=xlShiftUp
If (.Cells(i, j).Value = " ") Then .Cells(i, j).Delete shift:=xlShiftUp
Next i
Next j
End With
Application.ScreenUpdating = True
End Sub
Apprectiate the help.