+ Reply to Thread
Results 1 to 6 of 6

calculate the intersection of two colums (color + text)

  1. #1
    Registered User
    Join Date
    01-20-2016
    Location
    london
    MS-Off Ver
    2010
    Posts
    7

    calculate the intersection of two colums (color + text)

    example.JPG
    Hi Guys,

    I'm trying to use a UDF to calculate the intersection of two colums with multiple conditions.
    In the example above I can manage to count the number of Yellow cells, using the below UDF
    Please Login or Register  to view this content.
    I need to tweek this UDF so that it will count the intersection between colum C and D where there is a Yellow color on colum C and "X" in colum D.

    Any help with this?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: calculate the intersection of two colums (color + text)

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    01-20-2016
    Location
    london
    MS-Off Ver
    2010
    Posts
    7

    Re: calculate the intersection of two colums (color + text)

    Dear walruseggman,

    Thank you for your response.
    The code works exactly as I asked for, but only if rRange is in adjacent columns like "C3:D10". However, I missed to specify earlier that in my actual sheet, there will be data in multiple columns, not just in adjacent columns.

    Can this code be tweeked so that it will consider rRange to be like C3:C10 and D3:D10. or another example rRange could be C3:C10 and F3:F10.
    Meaning rRange 2 ranges.

    Any help is greatly appreciated.

  4. #4
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: calculate the intersection of two colums (color + text)


  5. #5
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: calculate the intersection of two colums (color + text)

    Sure, you'll just need to pass in both ranges into the function:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-20-2016
    Location
    london
    MS-Off Ver
    2010
    Posts
    7

    Re: calculate the intersection of two colums (color + text)

    Thanks, Great Job.

+ 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. Calculate average on some of the colums in a pivot
    By masben in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-02-2014, 04:40 AM
  2. Replies: 1
    Last Post: 07-16-2013, 06:41 PM
  3. [SOLVED] Compare Colums and Color enire row if values (text) do not match
    By GatorsBucs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2013, 11:43 AM
  4. How to do intersection of two one dimensional text arrays
    By laxmirajk in forum Excel General
    Replies: 1
    Last Post: 05-22-2011, 12:50 PM
  5. Calculate Intersection Point of 2 Products Sales
    By ClikClak in forum Excel General
    Replies: 5
    Last Post: 05-12-2010, 04:21 PM
  6. Calculate Point of Intersection
    By IronMan79 in forum Excel General
    Replies: 2
    Last Post: 11-13-2009, 12:13 PM
  7. [SOLVED] Calculate the intersection of supply and demand curve
    By Angus in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-04-2005, 11:06 AM

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