Hi Sonia Zanker,
Welcome to Microsoft Community.
Open your workbook, right-click on the worksheet name > View Code.
Paste the following code into the code editing area:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim rng As Range
Dim copyRange As Variant
Dim i As Integer
copyRange = Array(7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27)
If Not Intersect(Target, Rows(5)) Is Nothing Then
For Each cell In Intersect(Target, Rows(5))
If VarType(cell.Value) = vbBoolean Then
For i = LBound(copyRange) To UBound(copyRange)
Cells(copyRange(i), cell.Column).Value = cell.Value
Next i
End If
Next cell
End If
End Sub
Please remember to save the workbook file as an Excel macro-enabled workbook.
I cannot upload videos or GIFs here or on third-party websites, but I have tested the script I wrote, and it should work properly.
Select All:
Unselect All:
When writing the code, I designed it to detect the values in the cells of the 5th row. Therefore, it should not be limited to working only for 2 weeks or 11 weeks. In theory, it can extend to the maximum number of columns that Excel can accommodate. You are free to extend the dates according to the original format as much as you like.
Let me explain a few things:
As you may know, VBA operates based on desktop applications, so macros do not work in browsers (OneDrive.com), nor can they run on mobile phones. This "select all" macro is only supported in desktop applications. Unfortunately, you may need to find a solution that meets your needs on mobile phones.
About the idea of selecting all checkboxes on a mobile phone, another tip I can share is that the spacebar can quickly check/uncheck checkboxes within a selected range. This shortcut works across desktop applications, browsers, and mobile platforms.
I hope the macro I shared works for you and that the idea of selecting all on a mobile phone provides some useful direction. If you have any other questions or want to share more context, please let me know in your reply!
Best Regards,
Thomas C - MSFT | Microsoft Community Support Specialist