+ Reply to Thread
Results 1 to 19 of 19

CHECKBOX in cells

  1. #1
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    CHECKBOX in cells

    Hi

    I am trying to place checkboxes in multiple cells (for an attendance tracker) but would like to do this without using the developer tab and Form Control (but using Cell Control). I would simply like users to click on the checkbox (which puts a tick in it) as I have a final column which calculates a % of how many ticks ie. completed tasks. I don't think I can calculate percentages if I use Form Control via the developer tab.

    I cannot find anywhere on my version of Excel how to do it. There used to be a 'checkbox' option (next to comment, link etc.) when you clicked on the INSERT tab on the Excel ribbon but it's not there now.

    I have tried other ways like data validation but there's no option for checkbox on that either.

    Can anyone help me? I've attached an image of where the CheckBox is/was supposed to be ... but it's not on my ribbon.

    TIA
    Attached Images Attached Images
    Last edited by F1ash; 11-16-2023 at 02:37 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    It's not on my ribbon either. Please update your profile to indicate the version of Excel you are using.

    If you insert a Form control (or ActiveX control) you can link it to a cell, so the cell is TRUE if the box is ticked, and FALSE if not. Then you can calculate percentage by counting TRUE. No VBA is required.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    So I think I tried that but I'm not getting the desired result - just getting a blank. Could you please take a look at my attached sheet ? TIA
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    Your checkboxes were not linked to cells. I did it for you with a little code.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,953

    Re: CHECKBOX in cells

    An alternative to checkboxes is to use the Double click event to enter/delete a character in the cell.
    The cells are formatted with Marlett font and the doubleclick event enters or removes "a" which appears as ✔

    dynamic named range:
    Checkboxes =OFFSET(Sheet1!$A$2,1,1,COUNTA(Sheet1!$A:$A)-1,COUNTA(Sheet1!$2:$2)-1)
    Attached Files Attached Files
    Ben Van Johnson

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: CHECKBOX in cells

    It's a currently only available in certain versions
    https://insider.microsoft365.com/en-...boxes-in-cells
    Cheers
    Andy
    www.andypope.info

  7. #7
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    Thanks a lot!

    Do you mind explaining exactly what you did as I can't see the different between the formula for e.g. candidate 13 and the rest. (Candidate 13 doesn't work as I think you left it unlinked). How do you link to cells?

    Can I just copy a line to create a new line for a candidate or do I need to do something else.

    When I copy and create new rows and click on one check box the whole column gets ticked ??

    I need to be able to transfer this to my master sheet.

    Thanks again
    Last edited by F1ash; 11-17-2023 at 04:03 AM.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    I used some code to do it, and the code looks at the positioning of the check box and links it appropriately. However, sometimes the position of the checkbox is not precise and it gets linked to the wrong cell. Not sure how an entire row was missed.

    To do it manually, right-click on the checkbox, select Format Control, go to tab Control. Enter the cell address in "Cell link" or click in the box and then click on a cell.

    I will provide the code below if you are interested. I got it from this Microsoft community page.

    I thought this was your actual file. How is your master sheet different than what you attached?

    Also,
    I cannot find anywhere on my version of Excel how to do it.
    please update your profile to show your version of Excel.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    Well there's a lot more rows, over 100 .............. would I have to do each row at a time?

    (Sorry all I can see is version 2207 for Excel) in the Account section

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    The code will work on whatever cells are selected when you run the code.

    See also post #5 above for a solution that doesn't even need checkboxes. Frankly that's how I would do it. (You could also use the SelectionChange event for a single click, vs. double click).

    See screenshot for version (Microsoft 365) and the actual update version (yours is 2207)
    Excel version.jpg

  11. #11
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    Thanks guys - really appreciate the help. I think post #5 may be the way to go for me. I was hesitating with the double click as I need it to be simple as possible for folk using it.

    Pardon my ignorance but what would I have to change to change it to a single click? Is there anything in the code below I need to change?

    Please Login or Register  to view this content.

  12. #12
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    For single click use SelectionChange instead of BeforeDoubleClick. There is no Cancel argument.

  13. #13
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    Thanks a lot.

    Sorry I have another question. Do you know why the macro/code/sheet would not work if upload on to the cloud? It works fine on my desktop but once uploaded I don't get any ticks when clicking on the cell. I didn't realised it'd be a problem once uploaded an running on a browser.

  14. #14
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,953

    Re: CHECKBOX in cells

    Please Login or Register  to view this content.

  15. #15
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    Quote Originally Posted by F1ash View Post
    I didn't realised it'd be a problem once uploaded an running on a browser.
    I didn't realize you were running on a browser. This is why I keep asking what version of Excel you use.

    VBA will not run in the browser version of Excel.

    You can still use VBA to link the checkboxes, and then open that file in the browser version.

  16. #16
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    Sorry, sometimes using different versions so wasn't 100% sure.

    Didn't realise you couldn't run VBA on browser.

    So I've tried using your version of code again so that I can run in a browser and have selected the range but my percentages are not working. Could you possibly take a look at my master sheet? TIA
    Attached Files Attached Files

  17. #17
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    The formula is wrong. Do a global Find & Replace to change
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    to
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  18. #18
    Registered User
    Join Date
    09-22-2015
    Location
    London
    MS-Off Ver
    MS365 Enterprise Version 2310
    Posts
    58

    Re: CHECKBOX in cells

    Of course - thank you.

    Now getting the error "Excel for the web does not support running or interacting with Form Controls. To use Form Controls open on desktop App" which is not what I want.

    Anyway thank you all for all your help - greatly appreciated.

  19. #19
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,932

    Re: CHECKBOX in cells

    I did not try your file in Excel for the web. I knew VBA would not run but I thought checkboxes with no code would be OK. Sorry you hit that wall.

    I don't know any alternative other than just typing X into the boxes and COUNTIF(A5:E5,"X").

    I still need you to update your profile with your Excel version.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Deactivate cells based on checkbox selection and exclude inactive cells from SUM
    By olga6542 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2019, 01:20 PM
  2. Replies: 1
    Last Post: 07-12-2019, 12:18 PM
  3. Checkbox to add formula in cells
    By bdouglas1011 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-08-2018, 05:46 AM
  4. Checkbox to SUM cells
    By ricfig in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-07-2016, 12:42 PM
  5. Checkbox on / off applying to cells only in the same row as the checkbox
    By Grimace in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2012, 08:28 PM
  6. [SOLVED] Adding a Checkbox in Cells
    By Chaplain Doug in forum Excel General
    Replies: 3
    Last Post: 05-15-2006, 11:10 AM
  7. [SOLVED] Need checkbox automatically in some cells of a new row
    By stuff8458 in forum Excel General
    Replies: 0
    Last Post: 11-08-2005, 05:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1