Link to home
Start Free TrialLog in
Avatar of SimonSaysSQL
SimonSaysSQLFlag for United States of America

asked on

I need to insert a row into Excel and add another row with a checkbox

I have a task list in Excel and I have check boxes on the left side.
When I do it now I get double checkboxes like you see in row 14 and/or the checkboxes do not always fit their rows anymore and have to be fixed.

I want two things really.
1) If I make a row wider I want the checkboxes to stay in the center of the their row in Column A.
2) I want to be able to run a macro and insert a row and have it come in with a checkbox. Since I have some rows with checkboxes not in use below the active tasks, I was thinking it might be easier to co tp the end and copy a row and paste it into the needed row.

I am attaching an example. It has a macro from 
Which is great already in it to use the checkboxes.

Thanks for your help.

Avatar of nutsch
Flag of United States of America image

How about this? If you click on a cell, it will change the checkbox. If you insert a row, you just have to click in the first column to get the checkbox added.

My apologies, I had affected your to-do / done structure with this. Here is an updated version.
Avatar of SimonSaysSQL



This is a great idea. I can sort now without it mixing the checkboxes up.
I will of course award you the points.
I did want to ask if it is possible to select a row to add a row without having it change the to-do checkbox. I think I will get it confused.
if you add this line at the beginning of the selection change code, it will only change the checkbox if you select one cell, so if you select the row to insert, nothing will happen.
If Target.Cells.Count > 1 Then Exit Sub

Open in new window

Avatar of nutsch
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

This is so cool !

A to-do list with functioning checkboxes in Excel. I'm sure more people could use this. I wish I knew how to label it better.

Thanks !
Very Useful. Thanks for making the last adjustment. i appreciate it !
Have a good day !
Glad to help, and thanks for the grade.