P
PaulSinki
Can anyone please, please help?
I need to write a macro that will ask the user what week it is, then
find that corresponding week number on a spreadsheet and then put a
load of formula into the blank cells in that column from rows 9 down to
360.
I can get the macro to ask for the output and find the cells, but I
can't seem to get the last part to work. The code I'm using is below,
can anyone tell where I'm going wrong?
Dim intC As Integer
MyValue3 = Application.InputBox("What week is it?")
Cells(3, 3) = MyValue3
Range("o7:r7").Find(What:=MyValue3).Activate
intC = ActiveCell.Column
Range(Cells(9, intC), Cells(360, intC)).Select
Dim Cell As Range
For Each Cell In Selection
If Cell.Value <> "" Then
Cell.Offset(0, 11).Value = "=INDEX('Raw
Data'!R1:R600,MATCH((Template!RC[-13]&Template!RC[-12]),'Raw
Data'!C1,0),MATCH(R7C,'Raw Data'!R3,0))"
Range("O11").Select
End If
Next Cell
End Sub
I need to write a macro that will ask the user what week it is, then
find that corresponding week number on a spreadsheet and then put a
load of formula into the blank cells in that column from rows 9 down to
360.
I can get the macro to ask for the output and find the cells, but I
can't seem to get the last part to work. The code I'm using is below,
can anyone tell where I'm going wrong?
Dim intC As Integer
MyValue3 = Application.InputBox("What week is it?")
Cells(3, 3) = MyValue3
Range("o7:r7").Find(What:=MyValue3).Activate
intC = ActiveCell.Column
Range(Cells(9, intC), Cells(360, intC)).Select
Dim Cell As Range
For Each Cell In Selection
If Cell.Value <> "" Then
Cell.Offset(0, 11).Value = "=INDEX('Raw
Data'!R1:R600,MATCH((Template!RC[-13]&Template!RC[-12]),'Raw
Data'!C1,0),MATCH(R7C,'Raw Data'!R3,0))"
Range("O11").Select
End If
Next Cell
End Sub