+ Reply to Thread
Results 1 to 5 of 5

Formula to get Last Cell with Values

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Formula to get Last Cell with Values

    Hi All,

    How do I convert this formula to find the value of the last cell with value in a range.

    Please Login or Register  to view this content.
    See attached for a examples and results I'm after. Book1.xlsx

    Thanks!
    Last edited by smartbuyer; 12-03-2013 at 03:37 AM.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Formula to get Last Cell with Values

    maybe this one

    =INDEX(G2:G11,MATCH(9.99999999999999E+307,H2:H11))

    why not use iferror instead of isna
    also array

    =iferror(INDEX(A2:A11,MATCH(1,IF(B2:B11<>0,IF(B2:B11<>"",1)),0)),"")

    Edit: Or non array

    =INDEX(A2:A11,MATCH(TRUE,INDEX(ISNUMBER(B2:B11),0),0))
    Last edited by vlady; 12-03-2013 at 03:44 AM.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formula to get Last Cell with Values

    hi there. try:
    =LOOKUP(2,1/(B2:B11<>0),A2:A11)

    like what vlady mentioned; to counter errors in Excel 2007 & above, you could actually use IFERROR.
    =IFERROR(LOOKUP(2,1/(B2:B11<>0),A2:A11),"")

    if you need it to work in lower versions, then continue to use ISNA

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Formula to get Last Cell with Values

    Thank you!

    Quote Originally Posted by vlady View Post
    maybe this one

    =index(g2:g11,match(9.99999999999999e+307,h2:h11))

    why not use iferror instead of isna
    also array

    =iferror(index(a2:a11,match(1,if(b2:b11<>0,if(b2:b11<>"",1)),0)),"")

    edit: Or non array

    =index(a2:a11,match(true,index(isnumber(b2:b11),0),0))

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Formula to get Last Cell with Values

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Need to Replace Cell Values with Adjacent Cell Values
    By BYizz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2012, 07:22 PM
  2. Replies: 8
    Last Post: 07-16-2012, 08:21 AM
  3. Automatically emailing a range of cells if the cell values = other cell values.
    By Apollon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2012, 01:40 AM
  4. [SOLVED] Macro to loop through cell values in a column and format multiple cell values
    By Roop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2012, 05:39 PM
  5. Replies: 1
    Last Post: 04-24-2012, 09:24 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