Consulting

Results 1 to 3 of 3

Thread: Help with finding the right function

  1. #1
    VBAX Regular
    Joined
    Jan 2009
    Posts
    89
    Location

    Help with finding the right function

    I'm trying to find a function to use rather than using a loop, or a function that maybe work like a loop.

    What I need to do is go through column B and find the first instance that is equal to ro greater than the number in cell H2.

    I was able to do this using a loop but the end user would like it to be more flexible. I may just have set it so the user could just run the loop again if and when the value of H2 gets changed but I'm looking for a possible alternative.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Use an array formula

    =INDEX(A:A,MIN(IF(A1:A2000>=H2,ROW(A1:A2000))))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Use an array formula

    =INDEX(A:A,MIN(IF(A1:A2000>=H2,ROW(A1:A2000))))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •