+ Reply to Thread
Results 1 to 6 of 6

Returning the first value in a column of values

  1. #1
    Registered User
    Join Date
    04-05-2007
    Posts
    2

    Returning the first value in a column of values

    Hi,

    I want to return the first value in a column of values

    This would be very similar to =INDEX(F11:F18,1) where the list of values is stored in cells F11 to F18.

    But I would like it to automatically return the value of the next cell if the first cell is blank. Or even return the value of the third cell if the first two are blank.

    i.e.

    F11 = blank
    F12 = 34
    F13 = 65
    F14 = 523
    F15 = 554
    F16 = 5354
    F17 = 5333
    F18 = 51354

    The function would return the value in F12 as F11 is blank. If there is a value in F11 then that would be returned.

    Thanks for any help

  2. #2
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by archie999
    Hi,

    I want to return the first value in a column of values

    This would be very similar to =INDEX(F11:F18,1) where the list of values is stored in cells F11 to F18.

    But I would like it to automatically return the value of the next cell if the first cell is blank. Or even return the value of the third cell if the first two are blank.

    i.e.

    F11 = blank
    F12 = 34
    F13 = 65
    F14 = 523
    F15 = 554
    F16 = 5354
    F17 = 5333
    F18 = 51354

    The function would return the value in F12 as F11 is blank. If there is a value in F11 then that would be returned.

    Thanks for any help
    this might help

    =INDEX(F11:F18,COUNTBLANK(F11:F18)+1)

  3. #3
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Use this array formula (just use your applicable range)

    =INDEX(A1:A7,MIN(IF(A1:A7<>"",ROW(A1:A7))))

    Do note, this is an array formula, so you must press CTRL+SHIFT+ENTER

    EDIT TO ADD: Starguy's formula would work as well, assuming that there are no blanks after the first number. For example, if you have Blank,blank, 3,4,5,blank,7 that formula would return 4. If this is not the case, I would suggest using his formula.
    Last edited by BigBas; 04-05-2007 at 10:52 AM.

  4. #4
    Registered User
    Join Date
    04-05-2007
    Posts
    2
    Excellent - Thanks for that!

  5. #5
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Glad you found a solution.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    A non-array version...

    =INDEX(F11:F18,MATCH(TRUE,INDEX(F11:F18<>"",0),0))

+ Reply to 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