+ Reply to Thread
Results 1 to 3 of 3

Formula for counting back cells with zero (until positive value)

  1. #1
    Registered User
    Join Date
    07-15-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    2

    Formula for counting back cells with zero (until positive value)

    Hi all, new to the forum, and i've been thankful for everyones expertise over the years.
    I have a formula question that i cant seem to crack.
    I have a massive accounting spreadsheet that managing incoming monthly payments from customers, and unfortunately, some dont pay each month, and i need to know how many weeks pave passed since last payment.
    I need a formula that looks back (right to left) and shows how many zeros ($0.00) there are until it hits a positive amount.
    The attached sample shows this better. Column Q needs the formula, and the numbers in red are the right answers. The greyed cells are what the formula needs to count.

    Any assistance here would be truly appreciated.

    thanksExcel Sample Sheet.xlsx

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Formula for counting back cells with zero (until positive value)

    Put this array* formula in Q2:

    =15-MAX(IF(B2:P2>0,COLUMN(B2:P2)-1))

    then copy down.

    *Note that an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) instead of the usual <Enter>.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-15-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    2

    Re: Formula for counting back cells with zero (until positive value)

    Genius, thanks mate.
    And quite a simple solution now that i see it!

    cheers

+ 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] Referencing back to cells for formula
    By ohanish in forum Excel General
    Replies: 2
    Last Post: 03-27-2015, 11:52 AM
  2. Replies: 7
    Last Post: 06-30-2014, 01:51 AM
  3. [SOLVED] SUM formula not counting positive numbers in column
    By WGBarry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-07-2013, 08:48 AM
  4. [SOLVED] Counting Number of Times a Value is Repeated REPEATEDLY (Back to Back)
    By patrickfshield in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-06-2012, 04:45 AM
  5. Excel formula to bring back cells two cells down?
    By dianedeetran in forum Excel General
    Replies: 2
    Last Post: 06-26-2012, 03:38 PM
  6. Replies: 2
    Last Post: 12-07-2007, 10:19 PM
  7. formula to copy last positive number in range of cells
    By rolan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-14-2005, 10:07 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