+ Reply to Thread
Results 1 to 8 of 8

Search first non-blank cell to return a value in another column

  1. #1
    Registered User
    Join Date
    06-09-2014
    Posts
    3

    Search first non-blank cell to return a value in another column

    Hi All,

    Want to look in one column and find the first non-blank numerical value, then have it return a value from another column.

    Used to nest multiple IF functions together from different cells, but it seems overly complicated and time consuming. Sometimes I have over 30 cells to check.

    For example, if Column A contains weekly sales data by week, entered weekly, and Column E has corresponding comparison data from the previous year. I want to enter a formula to check the first row that has sales data entered and have it match up the comparison value in the other column.

    Any ideas would be appreciated.

    Thank you!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Search first non-blank cell to return a value in another column

    Try this array formula

    =INDEX(E1:E20,MATCH(TRUE,ISNUMBER(A1:A20),0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  3. #3
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Search first non-blank cell to return a value in another column

    Hi,

    Welcome to the Forum.

    Can u post a workbook with sample data (with sensitive information removed) ?
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

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

    Re: Search first non-blank cell to return a value in another column

    What version of Excel are you using?

    This will work in Excel 2010 and later.

    Data ranges A2:A10 and E2:E10.

    =INDEX(E:E,AGGREGATE(15,6,ROW(A2:A10)/ISNUMBER(A2:A10),1))
    Last edited by Tony Valko; 06-09-2014 at 02:06 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    06-09-2014
    Posts
    3

    Re: Search first non-blank cell to return a value in another column

    Thanks for all the suggestions.

    I have attached a test file showing what I'm trying to do.

    I tried the index function but it didn't do what I was looking for.

    Basically I would like B26 and C26 to automatically find the latest data in B4:B23 and C4:C23 and return the matching value in F4:F23 and G4:G23.

    I update the data weekly in Column B and C.

    Thanks again for all the prompt help. Really appreciated.

    Edit: Excel version is very old '97
    Attached Files Attached Files

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Search first non-blank cell to return a value in another column

    Try this in B26 and filled right to C26

    =LOOKUP(9.99999999999999E+307,B4:F23)

  7. #7
    Registered User
    Join Date
    06-09-2014
    Posts
    3

    Re: Search first non-blank cell to return a value in another column

    Quote Originally Posted by Jonmo1 View Post
    Try this in B26 and filled right to C26

    =LOOKUP(9.99999999999999E+307,B4:F23)
    I don't know why or how this works, but it does! Thank you very much!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Search first non-blank cell to return a value in another column

    You're welcome.

+ 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] Search for Value and Return a date from another cell in same column
    By RPM509 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2013, 02:24 PM
  2. Search a column across multiple workbooks and return the value of a different cell.
    By MrSpiffdifilous in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2013, 10:42 AM
  3. [SOLVED] Formula to search a column for a specific value, and return the value in the next cell
    By TimothyD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2013, 12:02 AM
  4. [SOLVED] Search Column for text, Return Cell below to another sheet?
    By Dewy1425 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2012, 08:07 PM
  5. Search column for name and return the value in the cell to the right of it.
    By walker313 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-14-2012, 01:03 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