+ Reply to Thread
Results 1 to 3 of 3

Count color cells in a spacific date range using VBA

  1. #1
    Registered User
    Join Date
    03-01-2024
    Location
    Kansas City, MO
    MS-Off Ver
    2308
    Posts
    2

    Exclamation Count color cells in a spacific date range using VBA

    Hello,

    I've recently learned about VBA code and I think it can solve a problem I currently have, but I don't have any experience with it.

    In the attached document (all sensitive information has been removed), I need to enter formulas in the highlighted cells that can be refreshed everyday to show how many parts have been manufactured and sold that day and in the current month.

    Using "Part 1" in the manufactured section:
    - For Daily Actual, I need to count all of the "blue" cells in the F Column of the "Part 1" sheet that has today's current date.
    - For MTD Actuals, I need to count all of the "blue" cells in the F Column of the "Part 1" sheet that has a date range for the current month we are in. Our current manufacturing month runs 2/25/24-3/30/24.

    Then I will need to repeat this for each part # and somehow make the dates adjustable for when the month's roll over. That's a bridge I'll cross when I get to it.

    I've used countif/ifs functions but it's my understanding that a simple formula doesn't exist to count cells with a specific color. I've found code that creates a count_color formula for me and it works, I just don't know how to add additional criteria like a date/date range.

    Any help you can provide would be absolutely appreciated!

    Tahnks1
    Jessie
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,891

    Re: Count color cells in a spacific date range using VBA

    Hi and welcome

    Could we see what the current code you have?

    Also may be beneficial if we could see an example or two of your expected outcomes.

    BSB

  3. #3
    Registered User
    Join Date
    03-01-2024
    Location
    Kansas City, MO
    MS-Off Ver
    2308
    Posts
    2

    Re: Count color cells in a spacific date range using VBA

    The color_count code I found is as follows:

    Please Login or Register  to view this content.
    The outcome for Part 1 Daily Actual in the manufacturing section should return a 1, as there was one part completed with today's date (highlight blue in the F column of second sheet), and the MTD Actual should return a 9, as there were 9 parts completed (highlighted blue) between the dates of 2/25/2023 and 3/30/2024.

+ 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. [SOLVED] Count color cell in defined date range (Difficult)
    By PNick in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-19-2023, 12:59 PM
  2. [SOLVED] Count fill color within defined date range
    By PNick in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-19-2023, 12:55 PM
  3. Count Cells in Date Range and Cell Color (using VBA)
    By newoak14 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2021, 09:37 AM
  4. Count Cells in Date Range and Cell Color (using VBA)
    By newoak14 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-27-2021, 09:05 PM
  5. [SOLVED] Count Cells in a range with a Certain Color
    By AllisterB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2021, 05:29 AM
  6. Adding Spacific Date Range
    By rmorganpier45 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2014, 09:45 PM
  7. Count Cells in a Row based on color and date range
    By indnracn2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2009, 11:12 PM

Tags for this Thread

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