+ Reply to Thread
Results 1 to 10 of 10

VBA - Merge two Column using Distance

  1. #1
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    VBA - Merge two Column using Distance

    Merge data from two columns using Distance.
    Attached Files Attached Files
    Last edited by sanju2323; 02-28-2015 at 02:00 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: VBA - Merge 2 Column From Distance

    Hi sanju,

    Run the Macro on the attached sheet and it will do what I think you want.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: VBA - Merge two Column using Distance

    MarvinP Sir, File shown error -
    Protected view office has detected a problem with this file. Editing it may harm your computer.

  4. #4
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: VBA - Merge 2 Column From Distance

    Error - Copy.jpg
    Please solve problem and attach again copy

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: VBA - Merge two Column using Distance

    Hi sanju,

    I just ran the code again and it worked fine on my Excel 2013. I simply recorded a macro and didn't edit it. I think the problem is on your end. What is ERTAT? Perhaps you are trying to run it off a server or your Virus protection software is giving you the message?

  6. #6
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: VBA - Merge 2 Column From Distance

    MarvinP Sir, or Please give me VBA CODE

  7. #7
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: VBA - Merge 2 Column From Distance

    ERTAT? program is Draw Table excel to autoCAD

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: VBA - Merge 2 Column From Distance

    Here is the recorded macro to do your problem.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: VBA - Merge 2 Column From Distance

    sir This code works pretty awesome. But give to me a slight improvement.
    1) i need result "K3" to "O".
    2) No need result color format as simple format.

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: VBA - Merge two Column using Distance

    Hi Sanju,

    Instead of giving you an answer it is time you learn how to answer this problem yourself. Read:
    http://www.contextures.com/excel-macro-record-test.html

    Here were my steps.
    1. Copy the first range
    2. Paste it after the second range on the right
    3. Copy the second range
    4. Paste it BELOW the range just pasted in step 2 above
    5. Sort the new combined range by the time colum

    Record the above steps and you will have exactly the macro I gave you.
    You can then decide where to paste your first range.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Calculating distance between many GPS points and sorting by distance
    By jackalek in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-14-2014, 08:27 AM
  2. [SOLVED] Google Distance Matrix API - Distance and Time
    By rtcwlomax in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2014, 08:42 PM
  3. [SOLVED] Edit distance (Levenshtein Distance) using Excel
    By cool_anu4u in forum Excel General
    Replies: 4
    Last Post: 10-09-2013, 08:46 AM
  4. [SOLVED] retrive the distance between any two cities from distance table
    By rksundaram in forum Excel General
    Replies: 5
    Last Post: 08-22-2013, 11:46 PM
  5. Replies: 0
    Last Post: 08-25-2005, 02:58 AM

Tags for this Thread

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