+ Reply to Thread
Results 1 to 5 of 5

Count the colors in the dynamic range

  1. #1
    Registered User
    Join Date
    10-10-2008
    Location
    England
    Posts
    3

    Count the colors in the dynamic range

    I think the title describes my problem.
    I need to count the cells in column a of a specified color, code complete.
    However I need limit the range of the function to those cells in column a which have text in.
    I have tried various codes successfully to find the last filled cell etc but combining with the colour function is proving difficult.

    Q1
    =ColorFunction(D2,A10:A999)

    where colourfunction is:
    Please Login or Register  to view this content.
    I want to dynamically change A999 to the last used cell in column a.
    I have a code which returns the row number of the last used cell but how do I get this into my function for color counting?

    Any help would be appreciated.
    Last edited by VBA Noob; 10-10-2008 at 07:44 AM.

  2. #2
    Registered User
    Join Date
    10-07-2008
    Location
    Wessex
    Posts
    55
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-10-2008
    Location
    England
    Posts
    3
    martesoft,
    thanks for the quick reply.
    Not sure what your changes do (cos I is no expert!) but after creating the module with your code I am still faced with the same problem in the function, what do I put in the rrange box?

  4. #4
    Registered User
    Join Date
    10-07-2008
    Location
    Wessex
    Posts
    55
    Same as before, it just checks now whether the target range has text or not, and doesn't count those where the colour may be as wanted, but the cell doesn't have text.

  5. #5
    Registered User
    Join Date
    10-10-2008
    Location
    England
    Posts
    3
    Thanks for that, works perfectly.

+ 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. Dynamic Named Range not re-evaluated
    By neilg_cebu in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 06-23-2008, 06:52 AM
  2. Defining dynamic range with VBA
    By inky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-23-2008, 04:21 AM
  3. Dynamic range with count ?
    By vumian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-22-2008, 06:28 AM
  4. match multiple criteria in a dynamic range
    By muchado77 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2007, 10:41 PM
  5. VBA code for dynamic name range
    By weii in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2007, 07:36 PM

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