Alright so after doing some browsing around I have found that the query is only good up to some 32 thousand data lines making it no longer viable for my application. So I went back to VBA and tried my hand at making a program. With a lot of trial and error, and google, I have come up with a code that works almost exactly how I want it to. However, I need some help tweaking it a bit.
Sub Update_Database()
'
' Update_Database Macro
'
' Keyboard Shortcut: Ctrl+j
'
Dim strSourceSheet As String
Dim strDestinationSheet As String
Dim lastRow As Long
strSourceSheet = "Master Sheet"
Sheets(strSourceSheet).Visible = True
Sheets(strSourceSheet).Select
Range("A2").Select
Do While ActiveCell.Value <> ""
strDestinationSheet = ActiveCell.Value
ActiveCell.Resize(1, ActiveCell.CurrentRegion.Columns.Count).Select
Selection.Copy
Sheets(strDestinationSheet).Visible = True
Sheets(strDestinationSheet).Select
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
Cells(lastRow + 1, 1).Select
Selection.PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheets(strSourceSheet).Select
ActiveCell.Offset(0, 0).Select
ActiveCell.Offset(1, 0).Select
Loop
End Sub
The problem that I have is that there are multiple revisions on a part causing my code to error when it hits those that are not identical to the sheet name. For the purpose of this worksheet all daughter parts have to be in the same sheet so I am not really sure how to apply a "contains" constraint or something similar to achieve this.
If anyone could help me with this problem I would really appreciate it.
Bookmarks