Forum Discussion
sf49ers19238597
Sep 22, 2022Iron Contributor
I need help with VBA
how shorted VBA down on a button on file 'WEEK 1
Worksheets("1").Range("K2").Formula = "=IF(INDIRECT(""'BYE WEEKS'!B3"")<>"""",INDIRECT(""'BYE WEEKS'!B3""),"""")"
Worksheets("1").Range("K3")....
HansVogelaar
Sep 22, 2022MVP
Private Sub CommandButton1_Click()
Dim w As Long
Dim sh As Worksheet
Dim r As Long
Dim c As String
For w = 1 To 18
Set sh = Worksheets(CStr(w))
For r = 2 To 7
c = Chr(66 + 3 * ((w - 1) Mod 6))
sh.Range("K" & r).Formula = "=IF(INDIRECT(""'BYE WEEKS'!B" & r & _
""")<>"""",INDIRECT(""'BYE WEEKS'!B" & r & """),"""")"
Next r
Next w
End Sub- sf49ers19238597Sep 23, 2022Iron Contributorthe code is red you give me
- HansVogelaarSep 23, 2022MVP
What is red? Please try to be specific.
- sf49ers19238597Sep 27, 2022Iron Contributorthe whole code on my end i copy your code