+ Reply to Thread
Results 1 to 5 of 5

Adding values above that is not zero

  1. #1
    Registered User
    Join Date
    09-07-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    34

    Adding values above that is not zero

    Good morning all!

    I was wondering if someone can help me with a formula:

    Logic: Add 1 to the last value that is greater than zero. So, for A5, the value should be 3 (A3+1)

    Example:

    A1 1
    A2 0
    A3 2
    A4 0
    A5 ?

    Thank you,
    Ghie

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Adding values above that is not zero

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is that what you need?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    09-07-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Adding values above that is not zero

    Yes but how can I combine these 2 formulas?

    =IF($A1=TRUE,"1","0")

    So basically there's another field that has a 0 and 1. If true return with 1 otherwise 0 then your formula would come to play after that. Does it make sense?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Adding values above that is not zero

    Maybe

    =IF(A2= TRUE, MAX($A$1:$A1)+1, 0)
    You'd need to start your data in A2 so that the MAX function can look at previous rows.

  5. #5
    Registered User
    Join Date
    09-07-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Adding values above that is not zero

    thank you very very very much!!!

+ 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] adding the values of cells to get a sum with some of the values represented by letters
    By Vachoen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-26-2019, 09:24 AM
  2. [SOLVED] adding mean and standard deviation values to chart while having % values
    By doters in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-19-2017, 05:09 PM
  3. Replies: 2
    Last Post: 09-06-2015, 12:03 AM
  4. [SOLVED] Formula for adding monthly values into annual values in a different sheet
    By cribi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-09-2015, 08:12 PM
  5. Replies: 4
    Last Post: 06-28-2012, 07:08 AM
  6. Adding values in cells (stops adding after row 14)
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-02-2009, 09:43 AM
  7. Adding text values and date values to get a single-digit answer
    By e4excel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-24-2008, 12:53 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