Share via

Adding a checkbox Automatically

Anonymous
2013-08-14T08:27:13+00:00

My spread sheet is set to become a very large collection of data (easily searched through filters).

Column H and I contain check boxes.

Everytime I enter new data into a new row I have to manually add these Checkboxes. My associate isnt as computer literate as I, so I would like to take this task away from him.

Is there a formula/coding I can add into the Cells  of Columns H and I that automatically populates the cell with a check box if data is input in the same row?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2013-08-18T18:45:24+00:00

    Gary's Student,

    Might want to add code to check if checkboxes are already on that row before you add checkboxes.  Just a thought.

    --

    Regards,

    Tom Ogilvy

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-08-18T18:07:01+00:00

    Put the following event macro in the the worksheet code area:

    Private Sub Worksheet_Change(ByVal Target As Range)

    Dim R As Long, shp As CheckBox

    Dim r1 As Range, r2 As Range

    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub

    Application.EnableEvents = False

    R = Target.Row

    Set r1 = Range("H" & R)

    Set r2 = Range("I" & R)

    ActiveSheet.CheckBoxes.Add(358.5, 93, 41.25, 33).Select

    Set shp = Selection

    shp.Left = r1.Left

    shp.Top = r1.Top

    shp.Height = r1.Height

    shp.Width = r1.Width

    ActiveSheet.CheckBoxes.Add(358.5, 93, 41.25, 33).Select

    Set shp = Selection

    shp.Left = r2.Left

    shp.Top = r2.Top

    shp.Height = r2.Height

    shp.Width = r2.Width

    Application.EnableEvents = True

    End Sub

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-08-14T12:26:49+00:00

    It would just need to Column A "Name".

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-08-14T12:14:20+00:00

    Hi,

    It would be much easier just to use data validation with True/False or Yes/No

    You can then just fill down those cells.

    Regards

    JY

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-08-14T11:51:44+00:00

    Which columns must have data entered into them before the checkboxes are added?

    Was this answer helpful?

    0 comments No comments