+ Reply to Thread
Results 1 to 3 of 3

Count w/colorfunction and two criteria

  1. #1
    Registered User
    Join Date
    11-17-2009
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 365
    Posts
    66

    Count w/colorfunction and two criteria

    I am attempting to count w/two criteria. A1:A20 = shaded cells/B1:B20 = text values. I have the correct vba to make the colorfunction formula work on its own, but am having difficulty making it work with two criteria. (C1 = shade criteria, D1 = text criteria)

    This is what I have now:

    =SUMPRODUCT(--(colorfunction(C1,A1:A20,FALSE)),--(B1:B20=D1))

    I'm attempting to show how many cells of identical color have the same data in another column as well.

    Suggestions? The VBA code is listed below.

    Thanks!

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 11-17-2009 at 08:16 AM. Reason: tags added in response to post # 3

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Count w/colorfunction and two criteria

    Hi,

    please put your code between code tags like this: [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]. That will make the code easier to read and copy. HTML otherwise strips out indentation and consecutive spaces.

    While you're waiting for a reply, you may want to check the forum rules to find out how to post properly and get brilliant results!


    cheers
    Last edited by teylyn; 11-17-2009 at 03:19 AM.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count w/colorfunction and two criteria

    Figboot, thank you for adding tags however please note you should always amend your original post (else you're not really resolving the problem at hand).

    On this occasion I've modified for 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