Hi,
I need to modify this code so that it will skip the headings as well as the blank rows below the headings.
Sub Billing()
Dim Data As Variant
Dim DstWks As Worksheet
Dim LastRow As Long
Dim n As Long
Dim NextRow As Long
Dim SrcRng As Range
Dim SrcWks As Worksheet
'UnProtectall
Set DstWks = ThisWorkbook.Sheets("Billing Summary")
NextRow = DstWks.Cells(Rows.Count, "A").End(xlUp).Row
NextRow = IIf(NextRow < 3, 3, NextRow + 1)
For Each SrcWks In ThisWorkbook.Worksheets
Select Case SrcWks.Name
Case "Audit Summary", "Accuracy Report Group", "Master Provider List", "Instructions", "Billing Temp", "Audit Temp", "Code_Table", "Billing Summary"
' Skip these worksheets
Case Else
Set SrcRng = SrcWks.Range("A20:i90")
LastRow = SrcRng.Cells(SrcRng.Rows.Count, SrcRng.Column + 1).End(xlUp).Row
Set SrcRng = SrcRng.Resize(RowSize:=LastRow - SrcRng.Row + 1)
ReDim Data(1 To SrcRng.Rows.Count, 1 To 10)
For n = 1 To SrcRng.Rows.Count
Data(n, 1) = SrcWks.Range("c4")
Data(n, 2) = SrcRng.Item(n, 2)
Data(n, 3) = SrcRng.Item(n, 3)
'Data(n, 4) = Empty
Data(n, 4) = SrcRng.Item(n, 4)
Data(n, 5) = SrcRng.Item(n, 5)
Data(n, 6) = SrcRng.Item(n, 6)
Data(n, 7) = SrcRng.Item(n, 7)
Data(n, 8) = Empty
Data(n, 9) = SrcRng.Item(n, 9)
Next n
DstWks.Cells(NextRow, "A").Resize(n - 1, UBound(Data, 2)).Value = Data
NextRow = NextRow + n - 1
End Select
Next SrcWks
'ProtectAll
End Sub
I have attached a workbook Working copy of Billing Summary.xlsmto show how the data is setup. Currently it includes the headings (Office/Outpatient, Hospital and Re-Audit) with all the data below those headings for each of the physicians, however, I need it to skip those headings and the blank rows below them and only extract actual data.
thanks for the help
Missit
Bookmarks