Hi,
I have a probably very frightening piece of code below. It does the trick but is clunky I know. I just don't have the know how to streamline.
Its a very simple request I'm sure...
Copy columns from one sheet based on table headers in to another based on table headers (they are the same header names in both sheets).
Any advice welcome!
thank you
I have a probably very frightening piece of code below. It does the trick but is clunky I know. I just don't have the know how to streamline.
Its a very simple request I'm sure...
Copy columns from one sheet based on table headers in to another based on table headers (they are the same header names in both sheets).
Any advice welcome!
thank you
Code:
Sub GetClientData()
'
' GetClientData Macro
'
Sheets("Clients ").Select
Range("C3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("C3").Select
Sheets("ImportCCB").Select
Range("Table10[Control Centre Company Build]").Select
Selection.Copy
Sheets("Clients ").Select
Range("C3").Select
ActiveSheet.Paste
Sheets("CC Reconfiguration Data").Select
Range("b3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.ClearContents
Range("b3").Select
Sheets("ImportCCB").Select
Range("Table10[Control Centre Company Build]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("b3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[CompanyID]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("E3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[GDS]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("f3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[Current Profile PCC]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("h3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[Current Offline PCC]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("i3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[Current Online PCC]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("J3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[Account Number]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("k3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[Account Name]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("L3").Select
ActiveSheet.Paste
Sheets("ImportCCB").Select
Range("Table10[Current Bar Title/ Company Profile Name]").Select
Selection.Copy
Sheets("CC Reconfiguration Data").Select
Range("M3").Select
ActiveSheet.Paste
End Sub