+ Reply to Thread
Results 1 to 6 of 6

SumByColor with cell click

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    36

    SumByColor with cell click

    I have code that changes a cell fill to yellow when clicked... and back to blank when clicked again. This works fine.

    Please Login or Register  to view this content.
    I'm using a UDF to sum cells by color with this, and this too works fine.

    Please Login or Register  to view this content.
    Finally, I'm using
    Please Login or Register  to view this content.
    and this works... but I want it to work at each cell click within F3:F5.

    How do I make this formula fire when clicking in cell F3:F5? Seems like it should do it but I can't make it work. The only way it will work is if I click in the cell with the formula and hit enter.

    I believe I need a selection change event. Am I correct?

    Thanks for all you guys much smarter at this than I am. See attached picture.

    Excel1.png
    Last edited by Excellentt; 10-27-2015 at 08:38 PM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: SumByColor with cell click

    Changing a cell's color doesn't trigger Calculation. You could explicitly call calculation at the end of the Double Click event.
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: SumByColor with cell click

    Sorry. It didn't work.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: SumByColor with cell click

    Have you tried it combined with making the UDF volatile?

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: SumByColor with cell click

    you can add

    Please Login or Register  to view this content.
    to the UDF to make it reactive
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  6. #6
    Registered User
    Join Date
    08-07-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: SumByColor with cell click

    Thanks guys! You nailed it. Works perfectly!

+ 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. [SOLVED] UDF SumByColor but won't add up the decimals
    By Megan52843 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-08-2015, 01:46 PM
  2. Trying to get SumByColor working
    By Deathwing in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2014, 10:02 AM
  3. [SOLVED] Countif + SumByColor
    By sordid in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-11-2014, 05:55 AM
  4. [SOLVED] SumByColor(Rng)
    By JimMay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2006, 07:45 AM
  5. VBA defined function problem sumbycolor
    By Brian Matlack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2006, 08:17 AM
  6. how to use sumbycolor fuction?
    By Ghauri in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2005, 05:10 PM
  7. SumByColor Macro...
    By Murph in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2005, 07:05 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