+ Reply to Thread
Results 1 to 6 of 6

Colour Function

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    56

    Colour Function

    Hi,

    I found a VBA code that counts how many coloured cells I have..but I cannot seem to make it work (see attached file). I added the module and typed in the formula...but it is not returning the value. I have attached the sheet.

    I am looking to count how many of three different colours appears in column B and the % it comes up. Can someone let me know what I am doing wrong?

    The code I used is:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by marshymell0; 06-28-2013 at 02:12 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Colour Function

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Function

    You got to call the right function ColorFunction (instead of ColorFuncton)

    See the green cells.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    10-18-2012
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Colour Function

    Hi,

    I do not understand what you mean by "call the right function"

  5. #5
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Colour Function

    Quote Originally Posted by oeldere View Post
    You got to call the right function ColorFunction (instead of ColorFuncton)
    marshymellO, you appear to have perhaps left an "i" out in your worksheet...
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Colour Function

    ColorFunction (instead of ColorFuncton)

+ 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