+ Reply to Thread
Results 1 to 3 of 3

Return first non blank cell (cells have formulas that return blank)

  1. #1
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Return first non blank cell (cells have formulas that return blank)

    Hi, I am trying to figure out a formula to return the value of the first cell that is not blank in range E7:E21. Those cells have formulas in them though that are returning values, usually blank.

    Everything I have been trying has been returning the value (blank) in E7 because of the formula.

    Any help??

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return first non blank cell (cells have formulas that return blank)

    Try this array formula**:

    =INDEX(E7:E21,MATCH(TRUE,E7:E21<>"",0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    If every cell is blank you'll get the #N/A error.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Return first non blank cell (cells have formulas that return blank)

    Try this user defined function

    Please Login or Register  to view this content.

    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In a suitable cell, enter =FirstNonBlank(E7:E21)
    Remember to save the workbook as a macro enabled workbook .xlsm
    Martin

+ 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] Go to right thru a range and skip all blank cells, return value of first non-blank in rang
    By mysticmoron109 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-16-2015, 03:47 PM
  2. [SOLVED] Return False for blank cells with formulas
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2015, 02:19 AM
  3. Countifs should return blank results for blank row of cells
    By Groovicles in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2013, 06:20 PM
  4. Replies: 1
    Last Post: 06-29-2012, 01:16 PM
  5. Return Blank Cell if Sum Cells Blank or Zero
    By Battledeck in forum Excel General
    Replies: 6
    Last Post: 06-11-2012, 05:55 PM
  6. Formulas that return blank cell give #VALUE errors
    By fdservices in forum Excel General
    Replies: 1
    Last Post: 06-09-2008, 11:07 AM
  7. Replies: 3
    Last Post: 11-22-2007, 07:53 AM

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