Closed Thread
Results 1 to 15 of 15

Retrieving the Value of the First Non-Blank Cell in a List

  1. #1
    leveyc
    Guest

    Retrieving the Value of the First Non-Blank Cell in a List

    Hi, I tried this formula but everytime I use it I always get #VALUE! why? and if I wanted to find the second non blank and so on how would i mod the formula

  2. #2
    Forum Contributor
    Join Date
    12-07-2004
    Posts
    596

    Retrieving the Value of the First Non-Blank Cell in a List

    Problem:

    Retrieving the value of the first non-blank cell in Range1 (cells A2:A7).

    Solution:
    Use the INDEX and MATCH functions as shown in the following Array formula:
    {=INDEX(A2:A7,MATCH(TRUE,A2:A7

    To apply Array formula:
    Select the cell, press

  3. #3
    Registered User
    Join Date
    02-01-2007
    Posts
    6

    Would not work for me

    Hi I was looking at this formula but I keep getting a Value error, what I really was looking for was a formula that would retrieve data from a adjacent cell if data was entered in to a specified cell i.e. If A1:A5 and B1:B5 had text in them and data was enter in C1 I could return the data in A or B1 in a cell of another sheet

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    The formula in the Excel Tip is incomplete, it should be

    =INDEX(A2:A7,MATCH(TRUE,A2:A7<>"",0))

    To apply Array formula, so the the braces appear in the formula bar { } like so

    Select the cell, press Ctrl+Shift+Enter

    For the second part of your question take a look at this link, as a lookup looks like the solution to your problem

    http://support.microsoft.com/kb/214252
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    02-01-2007
    Posts
    6
    Thanks for the info very handy, but its not quite there, the piece missing is....I need the formula in A1 to look in a separate sheet in column C for the first cell in with data in it and report back all adjacent cell information, then in the next cell A2I need it to find the second cell in column C with data and report back adjacent call info....all help greatly appreciated Thanks

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi leveyc,

    Sorry for the delay in coming back to you, but I've been trying to come up with a solution to your problem. I've found a formula on Chip Pearson's site that reforms a column to eliminate blanks, the problem I'm having with the formula is writing it on Sheet1 to look at column C on Sheet2 once we've achieved that it a case of then doing a Vlookup for the other information. I'll keep you posted.

    Here's the link in question

    http://www.cpearson.com/excel/noblanks.htm

  7. #7
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by oldchippy
    The formula in the Excel Tip is incomplete, it should be

    =INDEX(A2:A7,MATCH(TRUE,A2:A7<>"",0))

    To apply Array formula, so the the braces appear in the formula bar { } like so

    Select the cell, press Ctrl+Shift+Enter

    For the second part of your question take a look at this link, as a lookup looks like the solution to your problem

    http://support.microsoft.com/kb/214252
    Hi,

    To get column C from the first non-blank row of Sheet2,

    try

    =OFFSET(Sheet2!A1,MATCH(TRUE,Sheet2!A1:A50<>"",0)-1,2)

    CSE (CTRL/Shift/Enter)

    to get the following row column B use

    =OFFSET(Sheet2!A1,MATCH(TRUE,Sheet2!A1:A50<>"",0)-0,2)

    and the next row

    =OFFSET(Sheet2!A1,MATCH(TRUE,Sheet2!A1:A50<>"",0)+1,2)

    however, looking up the 'next non-blank' if further blanks appear in the range could be difficult.

    hth
    ---
    Si fractum non sit, noli id reficere.

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi Bryan,

    How about using the formula from Chip's web page to create a list of non-blanks on Sheet1 from column C (with the blanks in) on Sheet2 , then using a vlookup table to get the additional data from the other columns on sheet2

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by leveyc
    Thanks for the info very handy, but its not quite there, the piece missing is....I need the formula in A1 to look in a separate sheet in column C for the first cell in with data in it and report back all adjacent cell information, then in the next cell A2I need it to find the second cell in column C with data and report back adjacent call info....all help greatly appreciated Thanks
    Hi leveyc,

    This is the only way I can see how to get the data from the non-blank cells from a separate sheet. Hope this helps - let me know?

  10. #10
    Registered User
    Join Date
    02-01-2007
    Posts
    6

    I think its nearly there

    Oldchippy

    Thank you, I think its nearly there, I guess the only way to get it complete is to send you the worksheet so you can see what I'm trying to work on, I have attached part copy with some notes, do appreciate your help

    Thanks

    leveyc
    Attached Files Attached Files

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Can not open your zip file, are you using Excel 2007, if so save it as 2003, then I will be able to open it. If you are not using 2007, try zipping it again.

  12. #12
    Registered User
    Join Date
    02-01-2007
    Posts
    6

    Try this one

    OldChippy

    Thanks
    Attached Files Attached Files

  13. #13
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi leveyc,

    Try this one, I think this will work for you?

  14. #14
    Registered User
    Join Date
    02-01-2007
    Posts
    6

    Thank You

    Hey OldChippy


    It works like a dream, thanks very much

  15. #15
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to help - thanks for the feedback

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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