+ Reply to Thread
Results 1 to 5 of 5

how to return the next result > zero

  1. #1
    Registered User
    Join Date
    01-16-2018
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    11

    how to return the next result > zero

    Hello all,

    I can't seem to be able to get the formula to return the next number up in a column that has a number > zero. For example:

    B11 must return the value in G10 unless the value in G10 is zero, in which case, B11 should then return the value in G9, unless G9 is zero, then B11 must return the value in G8. There should, theoretically not be more than 2 zero's in a row in column G, so the formula for B does not need to be infinite.

    HELP!!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: how to return the next result > zero

    does it end at B11 or can it be B100 and look all the way up to G2?
    this would handle it for B11
    =IF(G10>0,G10,IF(G9>0,G9,IF(G8>0,G8,IF(G7>0,G7,IF(G6>0,G6,IF(G5>0,G5,IF(G4>0,G4,IF(G3>0,G3,IF(G2>0,G2,"")))))))))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,237

    Re: how to return the next result > zero

    Try

    =LOOKUP(999999,1/(G2:G11<>0),G2:G11)

  4. #4
    Registered User
    Join Date
    01-16-2018
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    11

    Re: how to return the next result > zero

    That was perfect, thank you!!!

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: how to return the next result > zero

    you're welcome and thank you for the rep! BTW, I liked John's better.

+ 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. Return the earliest result and latest result with criteria
    By PFDave in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-26-2016, 07:20 AM
  2. [SOLVED] VBA return result
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-10-2016, 11:23 AM
  3. Replies: 7
    Last Post: 12-06-2015, 05:40 PM
  4. [SOLVED] If AL = a value i need B1 to return a result
    By t.regi in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-06-2015, 05:44 PM
  5. excel result return wrong calcuation result
    By garyww in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-14-2006, 06:20 AM
  6. Advanced formula - Return result & Show Cell Reference of result
    By Irv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-05-2006, 10:40 PM
  7. Return result only if....
    By Pat in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-06-2005, 04:34 PM

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