+ Reply to Thread
Results 1 to 15 of 15

Finding Last Row and Column (Without VBA) - Formula given!

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,108

    Finding Last Row and Column (Without VBA) - Formula given!

    Hello Excel Experts,

    I have 2 formulas here that find the last row and last column without VBA.

    I tried to put them together, so that I'm able to have the last row and column on a named range. Would experts please assist me.

    Thank you!

    Last Row without VBA
    Please Login or Register  to view this content.
    Last Column without VBA
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Perhaps
    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
    25,426

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Those will only work if you do not have any blank cells in row 3 or in column A.

    What named range are you trying to define - from A3 to the last-used column and row ?

    Pete

  4. #4
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,108

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Thanks Pepe!

    It works!!

    If I may ask, why $1:$65535 ???

    Is there a way to not make $1:$65535?

    Reason being, it's limited to 65535...if the row has more than 65535, I would need to go back and change the row again.

    That's why I have Sheet1!A:A,COUNTIF(Sheet1!A:A,"<>") so that it'll always "get" the last row of data

  5. #5
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,108

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Hey Pete,

    Yes, you're correct...in my case, row 3 and column A will never have blanks. The only time that it have blanks is that it is the last column and/or row.

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    The formula was made for XL2003. You can adapt that range as needed

  7. #7
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,108

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    So I guess there's no alternative of not having $1:$65535 in my named range then?

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    $1:$100000 will also do, you can make that part as long as you please

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,659

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Another solution:
    Please Login or Register  to view this content.
    Quang PT

  10. #10
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,108

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    I guess have no choice then...cause I really don't like to have it fixed to $100000...I would like excel to "automatically" know the row. Anyway, mark this as solved and rep increase!

    Thanks Pepe!

  11. #11
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    INDIRECT being volatile might slow things really down..

  12. #12
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Quote Originally Posted by dluhut View Post
    I guess have no choice then...cause I really don't like to have it fixed to $100000...I would like excel to "automatically" know the row. Anyway, mark this as solved and rep increase!

    Thanks Pepe!
    In fact that row number delimits a region where INDEX gets it's range. So, again, INDEX in my suggestion returns a reference to the cell in the last row and column
    It is a common mistake to think that INDEX returns a value. It only does when not imbedded in a formula. In that case it returns a reference.
    If you have some time this paper will make things much easier to grasp

  13. #13
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,659

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Quote Originally Posted by Pepe Le Mokko View Post
    INDIRECT being volatile might slow things really down..
    Sure. But it depends on either data size or OP's taste

  14. #14
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Quote Originally Posted by bebo021999 View Post
    Sure. But it depends on either data size or OP's taste
    I tend to disagree, at least partially. Why not give an answer that is as solid as possible in any case (provided of course there are no blanks in the ranges) ?

    The INDIRECT/ADDRESS combination in your formula can be replaced with INDEX, so why make things difficult ?

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,659

    Re: Finding Last Row and Column (Without VBA) - Formula given!

    Quote Originally Posted by Pepe Le Mokko View Post
    I tend to disagree, at least partially. Why not give an answer that is as solid as possible in any case (provided of course there are no blanks in the ranges) ?

    The INDIRECT/ADDRESS combination in your formula can be replaced with INDEX, so why make things difficult ?
    Just give him alternative option: LOOKUP can works with range with blank cells.
    In additional, he was insist on keeping away from either 65535 or 100000. What number of rows are enough?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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