I Have a macro for looking up a column by the header name and copying it into a new sheet, it works when i only have 1 header to copy when i try to add other headers it just goes back and copies the first one in the pose macro, does anyone know how to i get it to move on to the welcome letter header and copy that one on the second run and paste that column in the colums next to the Gym letter column
Sub Pose()
Call CopyByHeader("GYM_LTR")
Call CopyByHeader("WELCOME_LTR")End Sub
Private Sub CopyByHeader(header As String)
Sheets("MAIN").Select
Rows("1:1").Find(What:=header, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).EntireColumn.Copy
End Sub
Sub Mike()
'
' Mike Macro
'
'
Sheets.add After:=Sheets(Sheets.Count)
Application.run ("pose")
Sheets("Sheet1").Select
Columns("A:A").Select
ActiveSheet.Paste
Application.run ("pose")
Sheets("Sheet1").Select
Columns("B:B").Select
ActiveSheet.Paste
End Sub
Sub Pose()
Call CopyByHeader("GYM_LTR")
Call CopyByHeader("WELCOME_LTR")End Sub
Private Sub CopyByHeader(header As String)
Sheets("MAIN").Select
Rows("1:1").Find(What:=header, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).EntireColumn.Copy
End Sub
Sub Mike()
'
' Mike Macro
'
'
Sheets.add After:=Sheets(Sheets.Count)
Application.run ("pose")
Sheets("Sheet1").Select
Columns("A:A").Select
ActiveSheet.Paste
Application.run ("pose")
Sheets("Sheet1").Select
Columns("B:B").Select
ActiveSheet.Paste
End Sub