+ Reply to Thread
Results 1 to 19 of 19

Click and Mark a cell with an "x"

  1. #1
    Registered User
    Join Date
    12-18-2008
    Location
    Windsor
    Posts
    34

    Click and Mark a cell with an "x"

    Is there a way to set a cell so if you click it, an "X" will be in the cell and if you click it again it will clear? Specifically I am looking to do this in the "1st Trip" column on the attached. I was going to use a check box but the appear to small and it does seems as though in Excel 2003 the size can be adjusted?
    Attached Files Attached Files
    Last edited by dgaller; 12-18-2008 at 08:15 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Right-click the Quote Main tab, select View code, and paste this in the window that opens:
    Please Login or Register  to view this content.
    Double-click in K43:K49 to toggle between x and blank.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-18-2008
    Location
    Windsor
    Posts
    34
    Thank you.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You're welcome. Please mark as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  5. #5
    Registered User
    Join Date
    12-18-2008
    Location
    Windsor
    Posts
    34

    Good So Far, but

    How do I expand this to include other Cells? i.e cells I43:I49

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-18-2008
    Location
    Windsor
    Posts
    34
    When I past this in I get a debug error on the If LCase(.Value) = "x" Then line

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Post the workbook.

    Edit: A compile error or a run-time error?

  9. #9
    Registered User
    Join Date
    12-18-2008
    Location
    Windsor
    Posts
    34
    run-time error '13', Type Mismatch.

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    What's in the cell when you double-click it?

  11. #11
    Registered User
    Join Date
    12-18-2008
    Location
    Windsor
    Posts
    34
    Blank. I just noticed its a merged cell does that matter?

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    It matters. Don't merge cells.

  13. #13
    Registered User
    Join Date
    04-18-2013
    Location
    Coventry
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Click and Mark a cell with an "x"

    Hi,
    I have added the code you gave for use on my sheet across multiple cells and this works great on my laptop, only I want to use this on my Galaxy note tablet and I am having some issues.
    Is there a way of making it so a "single" click would bring the "x" in instead of two, as when I use my tablet and click twice it brigs the keyboard up therefore not allowing me to click twice.

    Thanks.

  14. #14
    Registered User
    Join Date
    07-09-2015
    Location
    NB, Canada
    MS-Off Ver
    13
    Posts
    6

    Re: Click and Mark a cell with an "x"

    Quote Originally Posted by shg View Post
    Right-click the Quote Main tab, select View code, and paste this in the window that opens:
    Please Login or Register  to view this content.
    Double-click in K43:K49 to toggle between x and blank.
    ok, I copied that into the "View Code" page on my sheet, but do I then save that to my file name?

  15. #15
    Registered User
    Join Date
    07-09-2015
    Location
    NB, Canada
    MS-Off Ver
    13
    Posts
    6

    Re: Click and Mark a cell with an "x"

    Rather than use an "X" or other alpha numeric symbol, is there a way to change the color of the cell when clicked on?

  16. #16
    Registered User
    Join Date
    07-09-2015
    Location
    NB, Canada
    MS-Off Ver
    13
    Posts
    6

    Re: Click and Mark a cell with an "x"

    Also, now when I go to save my spreadsheet, I get the following message. How do I save the file to include the cell feature?
    Attached Images Attached Images

  17. #17
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Click and Mark a cell with an "x"

    As the messgae says, you need to save it as an xlsm file. By design, Xlsx files do not, can not, contain macros.

  18. #18
    Registered User
    Join Date
    07-09-2015
    Location
    NB, Canada
    MS-Off Ver
    13
    Posts
    6

    Re: Click and Mark a cell with an "x"

    Quote Originally Posted by shg View Post
    As the messgae says, you need to save it as an xlsm file. By design, Xlsx files do not, can not, contain macros.
    Got it, forgot that you have to do that manually, which I don't understand why. Thanks

  19. #19
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Click and Mark a cell with an "x"

    It would be very bad behavior if Excel did it automatically.

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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