Consulting

Results 1 to 3 of 3

Thread: How can I find next small value(look up value) in a range?

  1. #1

    How can I find next small value(look up value) in a range?

    I like to find a small value for look up value in a range, then use a next small value for next look up value and so on...
    I don't know how to find..
    please help me..
    Thank you!!


    Do untill (find a name)
    small = Application.WorksheetFunction.Min(rng)
    how can I find next small one?

    ingrow = Application.WorksheetFunction.Match(small, rng, 0)

    name = rng.Cells(ingrow, -13).Value


    ss = Application.WorksheetFunction.VLookup(name, Range("sc"), i, 0)
    sy = Application.WorksheetFunction.VLookup(name, Range("sc"), i + 1, 0)



    If Worksheets("aa").Range("bb").Cells(y, x - 1) > 0 And _
    ss = "S" And sy = "S" Then

    Worksheets("aa").Range("bb").Cells(y, x) = name
    Worksheets("cc").Cells(ingrow, 16) = Worksheets("cc").Cells(ingrow, 16) + 1


    Else
    find a next small value to find a name to use for lookup value..

    loop

    Thank you again..

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location

  3. #3
    Than you a lot.

    But what if there are more than one same value in a range.

    How can I use them first before the second smallest one?

    Thank you~

Posting Permissions

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