Results 1 to 3 of 3

Counting zeros in an array based on variable dates

Threaded View

bhenderson Counting zeros in an array... 01-05-2012, 06:27 PM
p24leclerc Re: Counting zeros in an... 01-08-2012, 02:36 PM
bhenderson Re: Counting zeros in an... 01-09-2012, 12:40 PM
  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    22

    Counting zeros in an array based on variable dates

    Hello,

    I have attached a sample file with a few rows of data. I am trying to create code that will go row by row and count the zeros after the hire date for an employee as well as the zeros before the terminated date. The hire date and termination date are listed in column AV and AW.
    (Note: Hire date and termination date do not, necessarily, correlate with the first or last non-zero number.)

    My goal is to produce what I manually counted in columns AX and AY. I have highlighted the zeros that would be counted to hopefully make it clear what I need to count. In a nutshell I need to have the code:
    1. Check the hire date in the row
    2. Match the hire date to the closest date in row 2 (closest month would be fine)
    3. Begin counting 0's from this date to the end of the row (Grand Total column)
    4. Check the termination date in the row
    5. Match the termination date to the closest date in row 2 (closest month would be fine)
    6. Begin counting 0's that are from this date and earlier until the beginning of the row (Row Labels column)
    7. Loop to next row

    There will definitely be some zeros counted twice in each row but that is okay. I tried to put in some of my own code but it is only a start and way off. I am no Excel guru.

    Thank you for your help,
    Ben
    Attached Files Attached Files

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