Need to create a database with data from a daily report that has both bolded and non-bolded rows. The one attachment Error_Report_Database
shows how the database is set up and what information is associated within the three worksheets.
The second file is an example of a daily report. As can be seen, there are both bolded and non-bolded data rows. Additionally, there are two "Posted Late" tabs. One at the beginning and the other at the end of the workbook. Each of those will be combined into the one "Posted Late" worksheet within the Error_Report_Database
What is needed:
1. VBA procedure that recognizes only those bolded data rows
within each category and appends those rows into the database, Error_Report_Database
2. The source and database files will be in the same subdirectory.
3. The entire row of data should be copied, no parsing needed.
4. If the database is opened, save and close when the data is copied and appended.
5. The Error Items
, in the daily worksheet, don't need to be copied/appended to the database
6. It is not uncommon to have nothing in the first "Posted Late" worksheet, but several rows in the last sheet usually labeled "Posted Late (Date) PM"
The data rows usually start at row 8. The difficulty is that the Heading Rows are also bolded.
A "LastDataRow" Function is already in place, if that is needed for the code.
Public Function LastDataRow() As Long
Dim ExcelLastCell As Object, lLastRow As Long
ActiveSheet.DisplayPageBreaks = False
Set ExcelLastCell = ActiveSheet.Cells.SpecialCells(xlLastCell)
lLastRow = ExcelLastCell.Row
LastDataRow = lLastRow
The same format is also used for finding the LastDataColumn, if needed.
This will be used from a Macro button that calls the procedure within the PERSONAL.xlsb, as the daily report is generated by a third party program.