+ Reply to Thread
Results 1 to 4 of 4

Formula Help - Counting Blank Cells and Counting Number of Cells Since the Last Blank Cell

Hybrid View

  1. #1
    Registered User
    Join Date
    08-30-2018
    Location
    Texas
    MS-Off Ver
    Office 2016
    Posts
    2

    Re: Formula Help - Counting Blank Cells and Counting Number of Cells Since the Last Blank

    Sure.

    To help clarify, Period 1 is the most recent period. Period 8 was 8 periods (weeks/months) ago.

    Column B is the current code, which is easy -- Period 1 is the current period, so whatever is in that column is the current code

    Column C finds most recent non-zero code that was used, before the current non-zero code. So for example, for the 'Apple' item - The current code is 1, the most recent code that was not "code 1" was "code 2", back in period 4. Therefore, the answer is that "Code 2" was the prior non-zero code. For banana, the most recent non zero code change went from 2 to 1. Therefore, the prior non-zero code was code 2.

    Column D finds out when the last code change was. Any time the code changes - e.g. from 2 to 1, from 1 to 0(blank), etc., it's considered a code change. For apple, the last code change was from code 2 to code 1, in period 4. Therefore it has been 4 periods since the last code change. For banana, the last code change was from 1 to blank(0), in period 1, which means it has been 1 period since the code changed.

    I realize now that column E was too difficult to explain, so I have revised the table as such:
    pic3.PNG

    The new column E finds out many periods since there was a code. If there is currently a code, the answer is zero. If there has never been a code, like with Carrot, it counts all the periods.

    The new column F finds out how many periods since there was no code (a blank). If there is currently no code (blank), the answer is zero. If there has never been a code, like with Carrot, it counts all the periods.

    I've uploaded the revised workbook.

    Thanks for the help.
    Attached Files Attached Files

+ 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. Counting blank cells up to first non-blank cell
    By DLG3 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-08-2015, 07:36 AM
  2. Ignore blank cells in formula counting number of different cells.
    By deneh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-07-2015, 08:52 AM
  3. [SOLVED] repeat counting of blank cells till a cell with number/text
    By joshcct in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-03-2015, 03:33 AM
  4. [SOLVED] Counting number of non blank cells and inserting that amount on another sheet
    By cheeze83 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-20-2013, 05:39 AM
  5. counting the number of instances of blank cells in a range
    By moses67 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2013, 10:35 AM
  6. Counting number of non-blank cells for every nth cell
    By mqp92 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-03-2013, 11:08 AM
  7. [SOLVED] Counting number of non-blank cells in column......but getting run time error in vba
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-30-2012, 10:54 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