business1000
01-11-2015, 10:54 PM
I have hundreds of files every week that need their columns in the right order (attachment provided).
I need help developing a macro that will look at each file, pull the right data, and save it to a new file in destination folder with just the columns I need - in the column order I need them in.
I can convert the files to csv files if that would help come up with a solution.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Common/Destination File Column Names ==>>
Machine ID
Issue ID
Issue Cat
Operator Issue Start Date
Operator Issue End Date
No. Issue Points
No. Issue Points Addressed
No. Issue Points Resolved
Resolution 1st Level Review Status
Resolution 1st Level Review Date
Resolution 2nd Level Review Status
Resolution 2nd Level Review Date
Case Status
Case Status Date
Column Naming Variation
1
Machine ID
Issue ID
Issue Cat
Operator Issue Start Date
Operator Issue End Date
No. Issue Points
No. Issue Points Addressed
No. Issue Points Resolved
Resolution 1st Level Review Status
Resolution 1st Level Review Date
Resolution 2nd Level Review Status
Resolution 2nd Level Review Date
Case Status
Case Status Date
Column Naming Variation
2
MachineID
IssueID
IssueCat
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
Resolution1stLeve ReviewStatus
Resolution1stLevelReviewDate
Resolution2ndLevelReview Status
Resolution2ndLevelReviewDate
CaseStatus
CaseStatusDate
Column Naming Variation
3
MachineID
IssueID
IssueCat
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
Resolution1stLeve ReviewStatus
Resolution1stLevelReviewDate
CaseStatus
CaseStatusDate
Column Naming Variation
4
MachineID
IssueID
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
ResolutionReviewStatus
ResolutionReviewDate
CaseStatus
CaseStatusDate
Column Naming Variation
5
IssueID
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
ResolutionReviewStatus
ResolutionReviewDate
Column Naming Variation
6
Machine Code
Issue No.
CAT
Issue Start Date
Issue End Date
No. Issue Points
No. Issue Points Addressed
No. Issue Points Resolved
Review Status
Review Date
I need help developing a macro that will look at each file, pull the right data, and save it to a new file in destination folder with just the columns I need - in the column order I need them in.
I can convert the files to csv files if that would help come up with a solution.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Common/Destination File Column Names ==>>
Machine ID
Issue ID
Issue Cat
Operator Issue Start Date
Operator Issue End Date
No. Issue Points
No. Issue Points Addressed
No. Issue Points Resolved
Resolution 1st Level Review Status
Resolution 1st Level Review Date
Resolution 2nd Level Review Status
Resolution 2nd Level Review Date
Case Status
Case Status Date
Column Naming Variation
1
Machine ID
Issue ID
Issue Cat
Operator Issue Start Date
Operator Issue End Date
No. Issue Points
No. Issue Points Addressed
No. Issue Points Resolved
Resolution 1st Level Review Status
Resolution 1st Level Review Date
Resolution 2nd Level Review Status
Resolution 2nd Level Review Date
Case Status
Case Status Date
Column Naming Variation
2
MachineID
IssueID
IssueCat
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
Resolution1stLeve ReviewStatus
Resolution1stLevelReviewDate
Resolution2ndLevelReview Status
Resolution2ndLevelReviewDate
CaseStatus
CaseStatusDate
Column Naming Variation
3
MachineID
IssueID
IssueCat
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
Resolution1stLeve ReviewStatus
Resolution1stLevelReviewDate
CaseStatus
CaseStatusDate
Column Naming Variation
4
MachineID
IssueID
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
ResolutionReviewStatus
ResolutionReviewDate
CaseStatus
CaseStatusDate
Column Naming Variation
5
IssueID
OperatorIssueStartDate
OperatorIssueEndDate
No.IssuePoints
No.IssuePointsAddressed
No.IssuePointsResolved
ResolutionReviewStatus
ResolutionReviewDate
Column Naming Variation
6
Machine Code
Issue No.
CAT
Issue Start Date
Issue End Date
No. Issue Points
No. Issue Points Addressed
No. Issue Points Resolved
Review Status
Review Date