I have a spreadsheet that I'm trying to work out something I've never done before. I've researched and found that formulas won't cut it, I'll need to use VB (which I've never done) to make this work. In examples I've found the reference columns to move rows seems to be the first or last, and mine MUST be in the middle.
We have a source of data that comes over and is copy/pasted into excel and the order never changes, data always falls into the same cells as follows (rows are longer but this gives example of basic data):
[TABLE="width: 500"]
<tbody>[TR]
[TD]Load ID[/TD]
[TD]Site ID[/TD]
[TD]Site Name[/TD]
[TD]Material SubGrp[/TD]
[/TR]
[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD]1508130191101[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]19[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]ELKTON[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD]ULSD[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD]1508130451101[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]45[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]MADISON[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD]ULSD[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD]1508170521101[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]52[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]OAK GROVE[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]UNL[/TD]
[/TR]
[TR]
[TD]1508170521102[/TD]
[TD]19[/TD]
[TD]ELKTON[/TD]
[TD]B5[/TD]
[/TR]
</tbody>[/TABLE]
I need to figure out how when Site ID (B2) matches a range of numbers (for example 19, 52) it will move to a sheet named for the location of the site.
For the example - Any rows with 19 or 52 in "Site ID" need to move to the sheet named "PCT" and any with 45 in B2 need that row moved to sheet "KW".
There are going to be numbers 1-300 that will be grouped together in sets based on their locations (19 and 52 are in the same area and go to the same sheet, there will be some where it's 48,333,22,18 all go to another). The data will fall in a different order every time, but as long as B2 is referenced, the numbers will always correspond with those sheets.
All in all, I need to learn how to set this up as the source data changes daily, and when I paste it in to sheet 1 "Open Loads" I will have to add the filtered to sheets (PCT, KW and will have to add KT, KG, KM later).
I have linked the sheet that shows what I've started (scrubbed of extra stuff off the rows after) with and what needs filtered and how it needs moved over.
https://drive.google.com/file/d/0BzECPoCT-clXbURPYmR5NjZGalU/view?usp=sharing (file must be downloaded, in chrome it opens up like a pdf apparently?)
We have a source of data that comes over and is copy/pasted into excel and the order never changes, data always falls into the same cells as follows (rows are longer but this gives example of basic data):
[TABLE="width: 500"]
<tbody>[TR]
[TD]Load ID[/TD]
[TD]Site ID[/TD]
[TD]Site Name[/TD]
[TD]Material SubGrp[/TD]
[/TR]
[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD]1508130191101[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]19[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]ELKTON[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD]ULSD[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD]1508130451101[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]45[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]MADISON[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD]ULSD[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD][TABLE="width: 115"]
<tbody>[TR]
[TD]1508170521101[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]52[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]OAK GROVE[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]UNL[/TD]
[/TR]
[TR]
[TD]1508170521102[/TD]
[TD]19[/TD]
[TD]ELKTON[/TD]
[TD]B5[/TD]
[/TR]
</tbody>[/TABLE]
I need to figure out how when Site ID (B2) matches a range of numbers (for example 19, 52) it will move to a sheet named for the location of the site.
For the example - Any rows with 19 or 52 in "Site ID" need to move to the sheet named "PCT" and any with 45 in B2 need that row moved to sheet "KW".
There are going to be numbers 1-300 that will be grouped together in sets based on their locations (19 and 52 are in the same area and go to the same sheet, there will be some where it's 48,333,22,18 all go to another). The data will fall in a different order every time, but as long as B2 is referenced, the numbers will always correspond with those sheets.
All in all, I need to learn how to set this up as the source data changes daily, and when I paste it in to sheet 1 "Open Loads" I will have to add the filtered to sheets (PCT, KW and will have to add KT, KG, KM later).
I have linked the sheet that shows what I've started (scrubbed of extra stuff off the rows after) with and what needs filtered and how it needs moved over.
https://drive.google.com/file/d/0BzECPoCT-clXbURPYmR5NjZGalU/view?usp=sharing (file must be downloaded, in chrome it opens up like a pdf apparently?)