Automatically using specific data and distance matrix in calculations when typing product code in a cell

Homeros

New Member
Joined
Dec 21, 2013
Messages
1
Okey so my problem is twofold, but the the two parts are linked closely together:

PART I:
I have a an enormous amount of data all listed in columns in this shape:

product codeweight product x [ton]weight other products [ton]carrieradress 1adress 2adress 3 other data...
123422501main street5th streetparkway avenue...
25845102jordan streetroosevelt squarebeale street...
1234231bourbon streetlombard streetmadison ave...
12341253wall streetmichigan avebroadway...

<tbody>
</tbody>

Now, I'm looking for a way to type in a specific product code e.g. "1234" in a cell, and automatically specific data columns with that product code, are filtered out and a bunch of calculations is done on them.
Note: why specific data: because I don't need all columns, e.g. the columns with "other data" I don't need.

The calculations I need to do on that filtered out data are pretty simple, those I can do. But the tricky part is that I have to do this on a numerous amount of excel sheets, so I'm looking for a way to be able to make an excel/vba script and use it on another excel file.

Let me clarify; I myself see 2 ways to do it:
1) actually automatically filter out the data and automatically copy the needed data in the other excel sheet where the calculations are done.
2) include the calculations that need to be done in the script, so the copying to another worksheet/excel file is not necessary.


PART II:
In my opinion this will be the more difficult part and I don't know if there even exists a solution to this problem.
In the table mentioned above, there are a few adresses.
Actually I don't need the adresses as an output, but I need the distance between them. They're hubs.
So adress 1 = origin
Adress 2 = destination (from adress 1-> adress 2)
and also origin for the next step (adress 2 -> adress 3)

I tried this via Google Distance Matrix API but manually it's not humanly possible to do this for e.g. 70,000 product lines.
So the output I need is the total distance. Is there a way to implement this in the above part?

My apologies if my question is too lenghty but I wanted to explain the problem thoroughly.

Yours sincerely,

Tristan
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,215,268
Messages
6,123,965
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top