+ Reply to Thread
Results 1 to 3 of 3

Formula to look in adjacent cell, then look upwards till a nonblank cell is found

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    452

    Formula to look in adjacent cell, then look upwards till a nonblank cell is found

    What I want is a formula that will look to the cell to the left and if the cell is blank, to look into the cell above that and continue up until it finds a non blank cell and returns the text contained. If all cells are blank, the assumed text would be "All". I am wondering if I could do this without having to nest a bunch of If statements it will end up being numerous nestings. The purpose is to put the formula into the Indirect function for data validation purposes.

    The example shows in the columns the values that would be returned if there was the working function in the yellow section.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Formula to look in adjacent cell, then look upwards till a nonblank cell is found

    Please Login or Register  to view this content.
    insert this formula in c2 and copy it down the c column as needed

  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,440

    Re: Formula to look in adjacent cell, then look upwards till a nonblank cell is found

    This will give you "All" if B2 is empty, up until a name appears in column B:

    =IF(B2="",IF(C1="","All",C1),B2)

    Put it in C2 and copy down.

    Hope this helps.

    Pete

+ 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] Formula to copy adjacent cell if criteria is found
    By no_Fate in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-22-2015, 09:31 PM
  2. [SOLVED] Macro to find specific word in cell and then copy and paste the adjacent cell upwards
    By raytej82 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2014, 05:33 PM
  3. Replies: 4
    Last Post: 08-29-2014, 05:41 AM
  4. [SOLVED] I need a macro to copy down till adjacent column ends in a blank cell
    By Paul Hayward in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2014, 02:27 PM
  5. [SOLVED] Formula needed to return the text adjacent to the cell when found.
    By LMWI65 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-16-2012, 08:18 AM
  6. [SOLVED] Macro to find text and if found, copy an adjacent cell into a different cell
    By Raulus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-22-2012, 09:57 AM
  7. Replies: 2
    Last Post: 10-12-2012, 11:38 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