Results 1 to 6 of 6

Run series of math formulas with VBA for list of XY pairs

Threaded View

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    CA
    MS-Off Ver
    2011
    Posts
    73

    Run series of math formulas with VBA for list of XY pairs

    Hello,

    I have a list of coordinates (X,Y) starting in B2, C2. The length of the coordinates varies, input by the user. This example is 130 pairs. E135 shows what the coordinates look like if plotted. The goal is to find the two closest (X,Y) pairs by using the distance formula to compare (X1,Y1) against (X2,Y2)...(X130,Y130)...(Xn,Yn).

    When the closest pairs are found the distance and coordinates will be known. In our application a hole will be drilled at these points with a diameter. We must drill the hole at each point but two holes can not over lap or come too close to each other. Picture are included in the file. I have done all of the difficult math and its written out step by step, hopefully without error. I need help transforming the formulas into VBA code. The end goal is to identify the closest two points, use a cell as input for the drill bit radius, confirm that the two holes will not come in contact or close proximity where the separation distance is also an input. Finally to return the area between the hole and the safe distance. I have drawn out all the steps and calculations inside the excel file, just looking for someone to put this into VBA code. I think it might be a little difficult.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Math in Series
    By jhabijay_10 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2014, 05:26 AM
  2. how to write math formulas?
    By viljar in forum Excel General
    Replies: 1
    Last Post: 11-19-2011, 12:28 PM
  3. Convert simple cell math formulas to VB
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2010, 08:40 AM
  4. Math Formulas and Increments
    By azexlusr in forum Excel General
    Replies: 2
    Last Post: 04-07-2010, 03:52 PM
  5. Math Formulas in a Text Box
    By buddhajb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-01-2008, 09:53 PM
  6. Replies: 3
    Last Post: 02-16-2006, 07:00 AM
  7. Excel Math formulas
    By [email protected] in forum Excel General
    Replies: 2
    Last Post: 11-15-2005, 11:35 PM

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