+ Reply to Thread
Results 1 to 21 of 21

formula to get Last row with data

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

    formula to get Last row with data

    Hello:

    Please refer to attached file.
    I have data from cell E5 down as shown.
    I need formula in cell E1 to give the last row # which is greater then 0
    In this case it will be 29
    Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: formula to get Last row with data

    Here is one way to do it, confirm with Ctrl Shift Enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you want the actual cell reference then:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

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

    Re: formula to get Last row with data

    Hello ron:

    Thanks a lot

    R

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

    Re: formula to get Last row with data

    Hello Ron:

    Seems like it is giving wrong result.
    Please refer to attached file.
    Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files
    Last edited by rizmomin; 04-26-2018 at 06:33 PM.

  5. #5
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: formula to get Last row with data

    Hey, it's because it is taking those zeros as text. Convert them to numbers. If you must have them like that in text form then let me think of another way.

    Secondly, because your using row 1 for you formula and the array range in the formula is starting at row 2, kindly change the part of the formula that has "+1" to +2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: formula to get Last row with data

    Hello Ron:

    Yes some of them will be as TEXT, and so really would need the formula to accommodate.
    Thanks

    Riz

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula to get Last row with data

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  8. #8
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: formula to get Last row with data

    Here you go, you don't need to change the zeros to numbers:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you insist to put it on E1 (confirmed both formulas as array):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    EDIT: Sorry, you'll end up in trouble if any value in the range in a NUMBER ZERO. Let me see what else you can use.... Don't use the 2 formulas I just typed
    Last edited by ron2k_1; 04-26-2018 at 06:54 PM.

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

    Re: formula to get Last row with data

    Hello ALkey:

    I need row # instead of actual cell values
    Thanks
    R

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula to get Last row with data

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

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

    Re: formula to get Last row with data

    Put this in E1:

    =MATCH(LOOKUP(9E+99,E2:E100),E2:E100,0)+1

    Hope this helps.

    Pete

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

    Re: formula to get Last row with data

    Hello ron & Alkey:

    Please refer to attached file.
    Still does not give correct answer.
    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  13. #13
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula to get Last row with data

    Quote Originally Posted by rizmomin View Post
    Hello ron & Alkey:

    Please refer to attached file.
    Still does not give correct answer.
    Let me know if you have any questions.
    Thanks.
    It worked fine for me but try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: formula to get Last row with data

    Hello:

    Please refer to attached file.
    Look at your formula in cell H10
    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  15. #15
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula to get Last row with data

    The formula I gave you in Post #10 returns value 36. I don't a see the problem there.

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

    Re: formula to get Last row with data

    Wouldn't the answer be 28 in that file? (i.e. number greater than zero)

    Pete

  17. #17
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula to get Last row with data

    You want formula to return 28
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: formula to get Last row with data

    Hello:
    I am sorry but i need the last row# with not zero, greater then zero.
    In earlier attached sheet, last non-zero value is 4614.41 and thats the row# in need.
    R

  19. #19
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: formula to get Last row with data

    But that's row 28.

    "Who's on first?"
    Dave

  20. #20
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula to get Last row with data

    Riz, at least one of us maybe drunk and it' not me
    The formula form post 17 returns row 28. Row 28=4614.41
    End of story.

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

    Re: formula to get Last row with data

    Hello Alkey and others:

    Now i got it right, just to clear up below formula works

    Please Login or Register  to view this content.
    Once again thanks to all

    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. [SOLVED] array formula or formula to return column data except for certain data.
    By Pi* in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2018, 09:06 PM
  2. Replies: 6
    Last Post: 01-04-2017, 11:20 AM
  3. [SOLVED] Need Help INDEX Formula or V Lookup Formula Funtion for Data Sheet
    By tariqjahangir in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-20-2016, 01:30 AM
  4. [SOLVED] Formula to leave cell Blank until cells of formula have data
    By mbauman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-27-2015, 01:28 PM
  5. Replies: 0
    Last Post: 10-14-2015, 03:10 AM
  6. Replies: 1
    Last Post: 01-08-2015, 07:02 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