I have three Worksheets:
Matchback.xlsx
Sales.xlsx
DistanceCalc.xlsm
I want to Create a fourth sheet called MatchBack_Results.xlsx
I have included examples of all files. This looks like a loop within a loop, I'm just not sure how to execute it.
The MatchBack file and the Sales file will vary in length each time I have to perform this taks. The Line count is never the same, But I must compare Every set of coordinates in the Sales file to Each
set of coordinates in the MatchBack file.
I need to keep the closest Match in Meters, without duplicates and:
Place the entire row from the Sales file into the MatchBack_Results.xlsx file on the "SalesMatch" tab with the Distance placed at the end of the row, currently Cell AI or RC[35] AND
Place the entire row from the MatchBack file into the MatchBack_Results.xlsx file on the "OriginalMatch" tab with the Distance placed at the end of the row, currently Cell ET or RC[150]
If the Result is less than 3 meters in the MatchBack_Results.xlsx File on the SalesMatch tab place the word "EXACT" in the cell after the distance, Currently Cell AJ or RC[36]
The MatchBack File is the main file, I have converted all cooridnated to DMS. The Coordinates in this file will always be the Orgination Point with:
Orgination Latitude starts in Cell DA2 or RC[90]
Orgination Longitude starts in Cell DB2 or RC[91]
OLatDMS2-Txt being the Orgination Latitude, copy and pasted into the DistanceCalc Worksheet Cell B2 or RC[2]
OLongDMS2-Txt Being the Orgination Longitude, copy and pasted into the DistanceCalc Worksheet Cell C2 or RC[3]
The Next Step Would be to Open the Sales.xlsx I need to compare all the coordinates in this file and find the closest match to the coordinates in the MatchBack.xlsx file
Destination latitude Starts in Cell AD2 or RC[30]
Destination Longitude Starts in Cell AE2 or RC[31]
OLatDMS2-Txt being the Orgination Latitude, copy and pasted into the DistanceCalc Worksheet Cell B3 or RC[2]
OLongDMS2-Txt Being the ORgination Longitude, copy and pasted into the DistanceCalc Worksheet Cell C3 or RC[3]
The Distance in Meters is located in cell B5 on the DistanceCalc.xlsm Worksheet
I will discared all results over 528 feet or 160.934 Meters
Once the process is complete I would like the MatchBack_Results.xlsx sorted from Smallest to largest based on distance on each tab.
Any Assistance would be greatly appreciated.
I will attache MiniSheets. The Complete files are available. I would be happy to e-mail them
Thank you!
Matchback.xlsx
Sales.xlsx
DistanceCalc.xlsm
I want to Create a fourth sheet called MatchBack_Results.xlsx
I have included examples of all files. This looks like a loop within a loop, I'm just not sure how to execute it.
The MatchBack file and the Sales file will vary in length each time I have to perform this taks. The Line count is never the same, But I must compare Every set of coordinates in the Sales file to Each
set of coordinates in the MatchBack file.
I need to keep the closest Match in Meters, without duplicates and:
Place the entire row from the Sales file into the MatchBack_Results.xlsx file on the "SalesMatch" tab with the Distance placed at the end of the row, currently Cell AI or RC[35] AND
Place the entire row from the MatchBack file into the MatchBack_Results.xlsx file on the "OriginalMatch" tab with the Distance placed at the end of the row, currently Cell ET or RC[150]
If the Result is less than 3 meters in the MatchBack_Results.xlsx File on the SalesMatch tab place the word "EXACT" in the cell after the distance, Currently Cell AJ or RC[36]
The MatchBack File is the main file, I have converted all cooridnated to DMS. The Coordinates in this file will always be the Orgination Point with:
Orgination Latitude starts in Cell DA2 or RC[90]
Orgination Longitude starts in Cell DB2 or RC[91]
OLatDMS2-Txt being the Orgination Latitude, copy and pasted into the DistanceCalc Worksheet Cell B2 or RC[2]
OLongDMS2-Txt Being the Orgination Longitude, copy and pasted into the DistanceCalc Worksheet Cell C2 or RC[3]
The Next Step Would be to Open the Sales.xlsx I need to compare all the coordinates in this file and find the closest match to the coordinates in the MatchBack.xlsx file
Destination latitude Starts in Cell AD2 or RC[30]
Destination Longitude Starts in Cell AE2 or RC[31]
OLatDMS2-Txt being the Orgination Latitude, copy and pasted into the DistanceCalc Worksheet Cell B3 or RC[2]
OLongDMS2-Txt Being the ORgination Longitude, copy and pasted into the DistanceCalc Worksheet Cell C3 or RC[3]
The Distance in Meters is located in cell B5 on the DistanceCalc.xlsm Worksheet
I will discared all results over 528 feet or 160.934 Meters
Once the process is complete I would like the MatchBack_Results.xlsx sorted from Smallest to largest based on distance on each tab.
Any Assistance would be greatly appreciated.
I will attache MiniSheets. The Complete files are available. I would be happy to e-mail them
Thank you!