Hello,
I will start by giving a little context to what I am asking in this thread.
I am pulling multiple reports to one consolidation workbook to merge all of the data.
One of the reports pulls in information and the name is Firstname Lastname while all of the other reports are pulled as lastname, firstname.
What I am attempting to do is to change the name column to lastname, firstname before I merge all of these documents together in my VBA string.
I am thinking of adding it to the portion of VBA code I have when I am prepping the report for the merge. I have highlighted the name change portion that I am thinking of adding in red (which is fitting because it does not work)
'Remove Duplicates from FE Reports Sheet
Worksheets("FE Reports").Activate
Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Range("A5:E" & Lastrow).RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
'Filter out anything before 2015
'Range("A5:E" & Lastrow).AutoFilter Field:=4, Criteria1:=">09/01/2014"
'Range("A5:E" & Lastrow).AutoFilter Field:=4, Criteria1:="Completed"
Range("A2:E" & Lastrow).Sort key1:=Range("A:A"), Order1:=xlAscending, Key2:=Range("B:B"), Order2:=xlAscending, Header:=xlYes
Range("A2:A").Formula = "=MID(A2&", " & A2,FIND(" ",A2)+1,LEN(A2)+1)"
I will start by giving a little context to what I am asking in this thread.
I am pulling multiple reports to one consolidation workbook to merge all of the data.
One of the reports pulls in information and the name is Firstname Lastname while all of the other reports are pulled as lastname, firstname.
What I am attempting to do is to change the name column to lastname, firstname before I merge all of these documents together in my VBA string.
I am thinking of adding it to the portion of VBA code I have when I am prepping the report for the merge. I have highlighted the name change portion that I am thinking of adding in red (which is fitting because it does not work)
'Remove Duplicates from FE Reports Sheet
Worksheets("FE Reports").Activate
Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Range("A5:E" & Lastrow).RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
'Filter out anything before 2015
'Range("A5:E" & Lastrow).AutoFilter Field:=4, Criteria1:=">09/01/2014"
'Range("A5:E" & Lastrow).AutoFilter Field:=4, Criteria1:="Completed"
Range("A2:E" & Lastrow).Sort key1:=Range("A:A"), Order1:=xlAscending, Key2:=Range("B:B"), Order2:=xlAscending, Header:=xlYes
Range("A2:A").Formula = "=MID(A2&", " & A2,FIND(" ",A2)+1,LEN(A2)+1)"