+ Reply to Thread
Results 1 to 2 of 2

color function

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    1

    color function

    Hi,
    I am new here. Have used spreadsheets a fair amount but wanted to sum by font color. Using this formula it works fine only when you make changes, change font color or add or delete numbers in the column it will not return the answer until you double click on cell with the formula then click on empty cell. What am I doing wrong?
    =ColorSum(B2,D4:D36)


    Function ColorSum(ColorCell As Range, SumRange As Range) As Variant
    Dim Cell As Range
    For Each Cell In SumRange
    If Cell.Font.ColorIndex = ColorCell.Font.ColorIndex Then
    ColorSum = Cell + ColorSum
    End If
    Next
    ColorSum = ColorSum
    End Function

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,655

    Re: color function

    Excel does not recalculate based on color changes; color is not data to Excel.
    Entia non sunt multiplicanda sine necessitate

+ 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