+ Reply to Thread
Results 1 to 4 of 4

Excel formula to return last non-empty cell

  1. #1
    Registered User
    Join Date
    06-30-2020
    Location
    Bristol
    MS-Off Ver
    365
    Posts
    18

    Excel formula to return last non-empty cell

    Hi all,

    I hope you are all well and safe.

    I am trying to get a formula that returns the value of the last non-empty cell of a row.

    I am currently using the following formula which returns the last value of the last cell of the row but not the value of the last non-empty cell:
    =IFERROR(LOOKUP(2,1/(A1:F1<>""), A1:F1), "")

    Your help is much appreciated!

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,198

    Re: Excel formula to return last non-empty cell

    I am not sure I understand your question what is the difference between the last value of the last cell of the row and value of the last non-empty cell

    maybe attach an example as per the banner so we can see what you are asking

    unless you mean f1 or if(isblank(f1),"",f1)

  3. #3
    Registered User
    Join Date
    06-30-2020
    Location
    Bristol
    MS-Off Ver
    365
    Posts
    18

    Re: Excel formula to return last non-empty cell

    Hi davsth,

    Thank you for your comment.

    Here is the attachment.
    Attached Files Attached Files
    Last edited by IvanRama21; 07-03-2020 at 07:20 AM.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: Excel formula to return last non-empty cell

    How about
    =IFERROR(LOOKUP(2,1/(B2:F2>0), B2:F2), "")
    The reason your formula didn't work, is that F2 contains a 0, which you have chosen to hide.

+ 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] help! Date formula to Return blank if cell is empty
    By marquint in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-08-2014, 01:32 AM
  2. Replies: 8
    Last Post: 05-14-2013, 12:36 AM
  3. Replies: 4
    Last Post: 02-20-2012, 04:50 AM
  4. Replies: 2
    Last Post: 10-07-2009, 07:59 PM
  5. Formula Return result from non empty cell
    By innocent_eyes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2008, 03:23 AM
  6. [SOLVED] modifying this formula to return an empty cell
    By Outbacker in forum Excel General
    Replies: 3
    Last Post: 08-22-2006, 03:10 PM
  7. [SOLVED] return an EMPTY cell in an IF formula
    By JJN in forum Excel General
    Replies: 3
    Last Post: 02-10-2006, 12:20 PM
  8. formula/macro to return last non empty cell in a specified row
    By neowok in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2005, 10:32 AM

Tags for this Thread

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