+ Reply to Thread
Results 1 to 10 of 10

How to find a value that constantly changes in a column

  1. #1
    Registered User
    Join Date
    04-01-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to find a value that constantly changes in a column

    Hi,

    I want to create a function that finds the first value that does not equal to “NA” in column C and then return that value in a cell I designate i.e. cell F2. Please see attachment.

    In this example, it's a stock dividend estimate but this changes overtime. Ideally, I want to see the value "0.57" in cell F2.

    Thanks.

    Best regards,
    Jeff
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to find a value that constantly changes in a column

    hi Jeff, welcome to the forum. try this array formula:
    =INDEX(C2:C264,MIN(IF(ISNUMBER(C2:C264),ROW(C2:C264)))-ROW(C2)+1)

    ...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 might an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Edit: an addition if there are no numbers:
    =IF(COUNT($C$2:$C$264),INDEX(C2:C264,MIN(IF(ISNUMBER(C2:C264),ROW(C2:C264)))-ROW(C2)+1),"No numbers")
    Last edited by benishiryo; 07-11-2013 at 02:14 AM. Reason: additional info

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How to find a value that constantly changes in a column

    Ctrl - Shift - Enter
    =INDEX(C3:C264,MIN(IF(ISNUMBER(C3:C264),ROW(C3:C264))))
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How to find a value that constantly changes in a column

    Beni what is the row(C2)+1 do?

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to find a value that constantly changes in a column

    @humdingaling:
    your INDEX formula for the array portion starts from C3:C264. so C3 is considered row 1 of your array, C4 row 2, & so on. by using ROW(C3:C264), you are listing numbers from 3 to 264:
    {3;4;5;6;...262;263;264}
    it should start from 1 to 262. so i did a -ROW(C2). that is to minus the starting row so it becomes 0 to 261. then +1 to make it 1 to 262. your value is now seemingly "correct" because C88:C90 has the same values. change C90 to a different value & you won't get 0.57 anymore.

  6. #6
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: How to find a value that constantly changes in a column

    How about this?
    Please Login or Register  to view this content.
    with CTRL+SHIFT+ENTER
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How to find a value that constantly changes in a column

    Thanks for clarifying, so if my array is C1:C264 then i would not need row bit at the end?

  8. #8
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to find a value that constantly changes in a column

    Quote Originally Posted by humdingaling View Post
    so if my array is C1:C264 then i would not need row bit at the end?
    yes. there are a few variations people do. another variation is:
    =INDEX(C:C,MIN(IF(ISNUMBER(C3:C264),ROW(C3:C264))))
    this one above & the one i used are my preferred choices. OP often provides sample files & need to change some cell references to apply back to the original file. the 2 choices i mentioned allows them to insert or delete above C3 & still work. that's just a personal preference of course.

  9. #9
    Registered User
    Join Date
    04-01-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to find a value that constantly changes in a column

    Hi Guys,

    Thanks for getting back to me.

    Let me check this out.

  10. #10
    Registered User
    Join Date
    04-01-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to find a value that constantly changes in a column

    Hi Beni,

    Makes perfect sense - brilliant!

    Thanks for the quick response.

+ 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