Results 1 to 11 of 11

Use VBA codes to Fnd the closst point and record the row

Threaded View

  1. #1
    Registered User
    Join Date
    09-15-2009
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    9

    Question Use VBA codes to Fnd the closst point and record the row

    i have 10 points inserted in colume A, row 2-11(exclude row 1 due to title)
    and 10 points(ie.random order 1-10) inserted in colume B, row 2-11
    I have a point with value 5.8 in cell D4
    and a point with value5.8 in cell D5
    i wanna find the point in colume A which is closest to value in D4
    and find the point in colume B which is cloest to value in D5

    The answer should be the value 6,
    but what i want to find is what row is the answer in, and show in the cell D6
    so what should appear in D6 is 7, because the value 6 is in the 7th row.

    can someone point me a direction of how to do this?
    btw, i understand simple VBA code, im using direct cell reference here just to keep it simple.
    To whoever cares about my question and spend time on it~
    Thanks you! i am really grateful~~
    Attached Files Attached Files
    Last edited by kyod; 09-17-2009 at 02:19 PM. Reason: Solved

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