+ Reply to Thread
Results 1 to 4 of 4

Creating an array and selective counting of numbers across columns

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    22

    Creating an array and selective counting of numbers across columns

    Hello,


    I have a spreadsheet with lots of date columns. I am trying to count 0's inbetween numbers in each row. I currently have a piece of code that will count 6 consec. 0's in a row (as 1) to help me identify patterns. It is a great start but now I need to create an array of sorts.

    I need 2 pieces. One piece is an addition to my current counting code. I would like to have it only count the 0 if the date in the date column is 5 days from a non-zero number. That is kind of hard to explain so I have tried my best in the example and I dont know if it is possible but I thought someone might know a way.

    2nd piece is I need to create an array output of sorts. This would count all consec. 0's in each row and create a horizontal list. My ideal breakdown is shown in the sample as well. The colors are simply to help explain not part of the intended result. The explanation is in Cell HD2

    Thank you so so much for your help.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by bhenderson; 11-15-2011 at 01:35 PM. Reason: Forgot to include code

  2. #2
    Registered User
    Join Date
    10-25-2011
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Creating an array and selective counting of numbers across columns

    Sorry I didnt realize the sample attachment had been too large - it is now attached.

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Creating an array and selective counting of numbers across columns

    Hi

    Try these.
    ZeroCount2 counts all the consecutive zero items
    ZeroCount3 counts the zeros that are outside the 5 day window.

    Give them a good workout to make sure that things are as you expect. They do match your example output except for the 5th count of the consecutive zeros where you have 3, but the output should be 4 based on the coloring.

    Please Login or Register  to view this content.
    rylo

  4. #4
    Registered User
    Join Date
    10-25-2011
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Creating an array and selective counting of numbers across columns

    Sorry about the counting mistake and your ZeroCounter3 was exactly what I needed. Thank you so much - again!

+ Reply to Thread

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