+ Reply to Thread
Results 1 to 18 of 18

I need to be able to click on a cell to bold/unbold the number in the cell

  1. #1
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    I need to be able to click on a cell to bold/unbold the number in the cell

    I have a monthly vehicle report that I am revamping and I need to build some features into it to increase user friendlieness. I need to be able to click on a cell that has a day of the month in it, to bold or unbold and count/uncount the number of bold days. For example the days of the month will be in cells B6:I9 and the tally box at J7.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Maybe:

    Bold and Count

    Please Login or Register  to view this content.
    Clear Bold and Count
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Can i make it bold with one click and unbold with one click, as well as add and subtract per click? As it is a double click on a cell then a click off the cell creates the bold and the number count in the tally box. It doesn't unbold with a click or subtract when bold is turned off. Thanks for helping

  4. #4
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    If you already have the tally in J7 working with the bold/unbold count, wouldn't it be more efficient to train the people to use Cntrl+B to bold the cell and Cntrl+Z to reverse that action? That way, they can spend less time moving a mouse and more time on the keyboard, which would be faster as well as teach them something.

    Or they can use the "B" icon on the ribbon. But that reequires moving the mouse.

  5. #5
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    I am just trying to create the product that my bosses want. Maybe a way to click to highlight cells with fill color is a better way to do it. I already have a macro that counts highlighted cells. My boss wants a quick easy way to highlight the cells to show the days a given vehicle is used within the month when the report is printed.

  6. #6
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Try putting this code in the Worksheet Module.
    Please Login or Register  to view this content.
    I think this may be what you need.

  7. #7
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    The above code works whenever a cell is clicked one time, but also highlights cells as you pass through them using TAB or ENTER. So, it wasn't fool-proof. As you know you need to make it that way for bosses who don't know their way around a computer, vainly attempt to understand the concept of "cut and paste" and that something as incredibly simple as binary still gives them too many options.

    This code works with double clicking a cell.
    Please Login or Register  to view this content.
    Last edited by Jim885; 11-19-2013 at 12:21 AM.

  8. #8
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Try this .. I used Jim's Code and modified it to do Bold or unbold on double click and modified John's first code for the count.
    Please Login or Register  to view this content.
    hope this helps..
    Last edited by moonsaga; 11-19-2013 at 10:28 AM.

  9. #9
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    That is nearly perfect. I need the "double click to bold" to be restricted to the B6:I9 range. I also need to add in auto capitolization for ranges (A28:K42) and (J12:J21). I put in:

    [B]Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rng As Range

    If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
    Application.EnableEvents = False

    Set rng = Union([B1], [A28:K42,J12:J21], [G:G]) 'Upper Case
    If Not Intersect(Target, rng) Is Nothing Then
    Target = UCase(Target)
    End If

    Application.EnableEvents = True
    End Sub
    but I get a compile error: Ambiguous name detected. It works on other worksheets that don't have the code you provided. Thanks again for the help!

  10. #10
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    The compile error is due to the two "Worksheet_Change" events conflicting.

    Please Login or Register  to view this content.
    Also use [ CODE ] [ /CODE ] tags around your code. "forum rule"
    Last edited by moonsaga; 11-19-2013 at 02:00 PM.

  11. #11
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    I still need the auto bold or click to bold to be limited to the range B6:I9 and the auto caps isn't working properly. It seems like the click to bold is interfering with the auto caps?
    Last edited by giligancow; 11-19-2013 at 03:30 PM.

  12. #12
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Untested, but try this;
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Jim885, I'm sorry but I'm not sure how to use the code that you provided. Below is what I have so far...
    Please Login or Register  to view this content.
    Thanks again for helping out a beginner!

  14. #14
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    I got the bold / Unbold to only work in the B6:I9 range...

    Please Login or Register  to view this content.
    Hope this helps

  15. #15
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Thank you so much moonsaga! I had tried something similar but didn't have the second "End If". I still can't get the auto upper case to work. It works flawlessly if I don't have the code for the "double click to bold" in there but as soon as I put it in the auto caps doesn't work. The code I have for that is above.

  16. #16
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    I copied your code to my test workbook and It works for me with the rest of the code.. I don't know why it doesn't work for you..

  17. #17
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Hi,

    this is moonsaga's code with the ucase line added.
    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  18. #18
    Registered User
    Join Date
    10-23-2013
    Location
    St George, UT
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: I need to be able to click on a cell to bold/unbold the number in the cell

    Thanks xlbiznes but I need a different range to be auto upper case. I have a workbook with only this code and it works great:

    Please Login or Register  to view this content.
    I also have a workbook with code to bold/unbold a range of 31 numbers that represent a month. It also counts the number of bold numbers and tallies them in a separate cell. The part of the code that runs the bold and count works great but the auto upper case doesn't work in this workbook and is as follows:
    Please Login or Register  to view this content.
    Again, thanks for the help

+ 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. Separating Bold from After-Bold Parts of Cell Strings
    By mlexcelhelpforum in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2012, 07:11 AM
  2. Replies: 2
    Last Post: 02-06-2008, 07:27 PM
  3. Unbold cell in Column
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2007, 10:23 AM
  4. Join bold and non-bold text in one cell
    By bkincaid in forum Excel General
    Replies: 3
    Last Post: 03-20-2006, 09:10 PM
  5. [SOLVED] clicker that advances one number per click in a cell
    By Biff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM

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