Feb 10 2022 01:39 PM - edited Feb 10 2022 01:42 PM
=IF('BYE WEEKS'!B2<>"",'BYE WEEKS'!B2,"")
=IF('BYE WEEKS'!B3<>"",'BYE WEEKS'!B3,"")
=IF('BYE WEEKS'!B4<>"",'BYE WEEKS'!B4,"")
=IF('BYE WEEKS'!B5<>"",'BYE WEEKS'!B5,"")
=IF('BYE WEEKS'!B6<>"",'BYE WEEKS'!B6,"")
=IF('BYE WEEKS'!B7<>"",'BYE WEEKS'!B7,"")
How I convert to vba code?
Thanks You
SF49ers164480
Feb 10 2022 02:00 PM
Sub bye_weeks()
Dim i As Integer
For i = 2 To 7
If Sheets("bye weeks").Cells(i, 2).Value <> "" Then
Cells(i, 2).Value = Sheets("bye weeks").Cells(i, 2).Value
Else
Cells(i, 2).Value = ""
End If
Next i
End Sub
Maybe with this code.
Feb 10 2022 02:25 PM - edited Feb 10 2022 04:01 PM
Code do not work
How make a simple code
Feb 11 2022 07:22 AM
Does it work for you if you click the button in cell D2? These lines of code are the easiest way i can suggest to put your formulas into VBA and it works perfectly in my spreadsheet.