Results 1 to 9 of 9

VBA Count Records Which Match Column Heading

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Count Records Which Match Column Heading

    Hi, I wonder whether someone may be able to help me please.

    I'm trying to put together a script which counts the number of projects if the Project Month & Year are equal to the column header.

    To help with my explanation, I've attached a file which I hope will illustrate what I'm trying to accomplish.

    You will see there are 3 sheets:

    • The first is "In Flight Projects" which contains the raw data displaying the projects currently being worked on by staff.
    • The "Output" sheet shows my current 'Output' sheet, and
    • The last is my 'Desired' outcome.

    What I'm trying to do is as follows:

    • Search the column headings on the "Output" sheet which are dynamic, so the number of values will change, then
    • For each column heading, search column G on the "In Flight Projects" sheet and,
    • Where the date is greater than or equal to the column heading, count the project from column B on the "In Flight Projects" sheet (note the number of projects are also dynamic), and
    • Show the total number of projects in the appropriate column on the "Output" sheet

    For example you will see that in Feb 15, there were 30 projects being worked, as was the case in Mar 15.

    Three projects then had a finish date in Mar 15, so they were removed from the count in Apr 15.

    I normally have a good idea where to start, but this has really puzzled me.

    I just wondered whether someone could possibly look at this please and offer some guidance on how I may go about achieving this.

    Many thanks and the kindest regards
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Count number of cells in a column that do not match records in a seperate range
    By ports83 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-13-2013, 08:51 AM
  2. Count if column heading is
    By nd2828 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2012, 03:08 PM
  3. [SOLVED] How to match Row Name with Column Heading and display Column Value?
    By cezondz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2012, 10:38 AM
  4. Replies: 0
    Last Post: 05-17-2012, 12:59 PM
  5. Find Lowest Time, Match with Column Heading
    By nadler1744 in forum Excel General
    Replies: 1
    Last Post: 07-08-2009, 01:17 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