+ Reply to Thread
Results 1 to 13 of 13

Sum if bold

  1. #1
    Registered User
    Join Date
    07-26-2011
    Location
    melbourne
    MS-Off Ver
    Excel 2010
    Posts
    40

    Sum if bold

    Hi I am using the SumIfBold to add some cells in a range.
    How can i return the total that the SumIfBold has calculated in my worksheet at a defined range such as Range("NetTotal")?

    Thanks

    Please Login or Register  to view this content.
    Last edited by ashmott; 08-26-2011 at 02:49 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Sum if bold

    The following works for me:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Sum if bold

    Oh, a word of warning - changing fonts does not trigger a sheet recalculation, so even if you make the function above volatile it will not recalculate when you change cells to or from bold.

    You will either have to manually re-calculate, or call a re-calculation from, maybe, the selection change event.

  4. #4
    Registered User
    Join Date
    07-26-2011
    Location
    melbourne
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Sum if bold

    Thanks Andrew.

    If I want to display the sum at say cell(A1) could I use the following or something else. I basically need to display the sum at range(A1).

    Thanks

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Sum if bold

    You can use it either as worksheet function :- so in cell A1 you could put:

    Please Login or Register  to view this content.

    Or you can use it in a macro:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Sum if bold

    The code offered here, returns error >>> NAME? Is it becuase I use a newer version of excel?

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Sum if bold

    Quote Originally Posted by G.Bregvadze View Post
    The code offered here, returns error >>> NAME? Is it becuase I use a newer version of excel?
    You might have misspelled the UDF SumIfBold or you may not added the Andrew-R code in that file.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  8. #8
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Sum if bold

    I added the code, and save it as a macro enabled file. may be I misspelled the formula, but is it a case sensitive?

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Sum if bold

    No case sensitivity is not an issue

  10. #10
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Sum if bold

    It worked thanks a lot

  11. #11
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Sum if bold

    The function Rounds the final result, is it possible to remove the rounding ? I looked through the code but could not identified what to change

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Sum if bold

    Instead of Long change it to Double

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor G.Bregvadze's Avatar
    Join Date
    12-06-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010 - 2016
    Posts
    256

    Re: Sum if bold

    Thank, I was only changing Dim lTempCount As Double.


    Thank you...

+ 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