K
Kayote
Guys,
My problem is that I want my macro to insert columns inbetween some
cells and then do an iserror(vlookup (in those newly inserted columns)
to extract data from another sheet in workbook called 'Workings.xls'.
So far my code looks like this:
Dim CurMonth As String
Dim Warn As String
Dim Ans As Integer
Warn = "Please ensure that the Active Cell is where "
Warn = Warn & "you would like the columns to be inserted. Continue?"
Ans = MsgBox(Warn, vbYesNo)
If Ans = vbYes Then
Sheets(Array("UK", "FR", "DE", "IT", "ES")).Select
Sheets("UK").Activate
ActiveCell.Offset(0, -6).Columns("A:F").EntireColumn.Select
Selection.Copy
ActiveCell.Offset(0, 6).Range("A1").Select
Selection.Insert Shift:=xlToRight
ActiveCell.Offset(4, -5).Range("A1").Select
CurMonth = InputBox("Enter the Month 'Format: WE Mo#/Wk#'")
ActiveCell = CurMonth
ActiveCell.Offset(6, 0).Range("A1").Select
End If
End Sub
What I want to do is insert iserror(vlookup formula connecting to the
'Workings.xls' 'Wk20' sheet.
Cheers
My problem is that I want my macro to insert columns inbetween some
cells and then do an iserror(vlookup (in those newly inserted columns)
to extract data from another sheet in workbook called 'Workings.xls'.
So far my code looks like this:
Dim CurMonth As String
Dim Warn As String
Dim Ans As Integer
Warn = "Please ensure that the Active Cell is where "
Warn = Warn & "you would like the columns to be inserted. Continue?"
Ans = MsgBox(Warn, vbYesNo)
If Ans = vbYes Then
Sheets(Array("UK", "FR", "DE", "IT", "ES")).Select
Sheets("UK").Activate
ActiveCell.Offset(0, -6).Columns("A:F").EntireColumn.Select
Selection.Copy
ActiveCell.Offset(0, 6).Range("A1").Select
Selection.Insert Shift:=xlToRight
ActiveCell.Offset(4, -5).Range("A1").Select
CurMonth = InputBox("Enter the Month 'Format: WE Mo#/Wk#'")
ActiveCell = CurMonth
ActiveCell.Offset(6, 0).Range("A1").Select
End If
End Sub
What I want to do is insert iserror(vlookup formula connecting to the
'Workings.xls' 'Wk20' sheet.
Cheers