+ Reply to Thread
Results 1 to 5 of 5

Formula to get row # with last non-zero value

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Formula to get row # with last non-zero value

    Hello:

    Please refer to attached file.
    I need formula in cell c1 to give the last row# in column B with last non-zero value.

    In this case answer needs to be Row # 9

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files
    Last edited by rizmomin; 09-22-2018 at 04:00 PM.

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula to get row # with last non-zero value

    Hi

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

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

    Re: Formula to get row # with last non-zero value

    Hello again Riz,

    Try this array* formula in C1:

    =MAX(IF(B2:B11>0,ROW(B2:B11)))

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

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: Formula to get row # with last non-zero value

    Try this formula
    =LARGE(IF($B$1:$B$11<>0,ROW($B$1:$B$11)-ROW($B$1)+1),1) and press ctrl shift enter
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to get row # with last non-zero value

    Hello Pete & Jose:
    Thanks a lot

    Riz

+ 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. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  2. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  3. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  4. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  5. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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