Hello,
I'm attempting to create a list with four columns of checkboxes, adding up the "TRUE" in each row, left to right, to formulate a databar visual at the end of each row.
I've got a very long list, so manually linking each contiguous manually, for four columns, could be quite time consuming. I've found some VBA language that will link contiguous cells for each row, but it will only work when there is only one column of checkboxes. i.e. - the below example would work if checkboxes were in Column A, and I wanted a "TRUE" in Column B. What I can't figure out is how to move these same details for checkboxes in Column C and a second TRUE/FALSE outcome in Column D.
Sub LinkChecks()
'Update by Extendoffice
Dim xCB
Dim xCChar
i = 2
xCChar = "B"
For Each xCB In ActiveSheet.CheckBoxes
If xCB.Value = 1 Then
Cells(i, xCChar).Value = True
Else
Cells(i, xCChar).Value = False
End If
xCB.LinkedCell = Cells(i, xCChar).Address
i = i + 1
Next xCB
End Sub
Any insights would be much appreciated! Thank you for taking the time to help!
I'm attempting to create a list with four columns of checkboxes, adding up the "TRUE" in each row, left to right, to formulate a databar visual at the end of each row.
I've got a very long list, so manually linking each contiguous manually, for four columns, could be quite time consuming. I've found some VBA language that will link contiguous cells for each row, but it will only work when there is only one column of checkboxes. i.e. - the below example would work if checkboxes were in Column A, and I wanted a "TRUE" in Column B. What I can't figure out is how to move these same details for checkboxes in Column C and a second TRUE/FALSE outcome in Column D.
Sub LinkChecks()
'Update by Extendoffice
Dim xCB
Dim xCChar
i = 2
xCChar = "B"
For Each xCB In ActiveSheet.CheckBoxes
If xCB.Value = 1 Then
Cells(i, xCChar).Value = True
Else
Cells(i, xCChar).Value = False
End If
xCB.LinkedCell = Cells(i, xCChar).Address
i = i + 1
Next xCB
End Sub
Any insights would be much appreciated! Thank you for taking the time to help!