Re: Convert schedule into database
Quote from mhabibDisplay More
I tried the following code in your workbook and it seemed to work fine.
Sub ScheduleToDatabase() Dim rngcell As Range Sheets("Database").Activate Range("A4", Range("A4").SpecialCells(xlCellTypeLastCell)) _ .ClearContents Sheets("Schedule").Activate For Each rngcell In Range _ ("B4", Range("B4").SpecialCells(xlCellTypeLastCell)) If Not IsEmpty(rngcell) Then With Sheets("Database").Range("A65536").End(xlUp).Offset(1, 0) .Offset(0, 0).Value = Cells(rngcell.Row, 1).Value .Offset(0, 1).Value = Cells(3, rngcell.Column).Value .Offset(0, 2).Value = rngcell.Value End With End If Next End Sub
One more thing is they some time change the schedule by some spots so how can I input just those changes and keep those didn't change in the final database- Means the program will note the cancelled spot but keep in the database for future checking or note the "changed version" in case of changing of version of spot only? You can see in the example final result for this case in file Book3-Change.xls in Zip file.