Blizzardx23
New Member
- Joined
- Oct 18, 2016
- Messages
- 20
Hey everyone! Hope everybody is doing well.
I've bee searching around and I've found some threads that are similar to what I'm trying to do but small differences completely change the results.
I have a spreadsheet that is e-mailed to me daily. It has hundreds of lines that need to be separated into 7 or so sheets.
The code needs to find a specific word in "D" column (per row) to determine what sheet it copies that row to.
Example:
[TABLE="width: 452"]
<colgroup><col width="151" style="width: 113pt;" span="4"> <tbody>[TR]
[TD="width: 151, bgcolor: transparent"]Tag ID
[/TD]
[TD="width: 151, bgcolor: transparent"]Item Number[/TD]
[TD="width: 151, bgcolor: transparent"]Rate[/TD]
[TD="width: 151, bgcolor: transparent"]Description[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]243567742[/TD]
[TD="bgcolor: transparent"]AAJ07541[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Boat Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]453643564[/TD]
[TD="bgcolor: transparent"]A0721421[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Ski Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]123452345[/TD]
[TD="bgcolor: transparent"]A0257J25[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Boat Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]675856788[/TD]
[TD="bgcolor: transparent"]A0257J25[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"]Yacht Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]345674577[/TD]
[TD="bgcolor: transparent"]A0D1J124[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Car Land[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]536785683[/TD]
[TD="bgcolor: transparent"]A04152D2[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Truck Land[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]456846657[/TD]
[TD="bgcolor: transparent"]A0D1J17J[/TD]
[TD="bgcolor: transparent"]Z[/TD]
[TD="bgcolor: transparent"]Bike Land[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]234523456[/TD]
[TD="bgcolor: transparent"]A222A251[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Glider Air[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]244565436[/TD]
[TD="bgcolor: transparent"]A0D02424[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Plane Air[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]234456425[/TD]
[TD="bgcolor: transparent"]AA1D10A2[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Plane 2 Air[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]765753648[/TD]
[TD="bgcolor: transparent"]AA234FS2
[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Plane 2 Air[/TD]
[/TR]
</tbody>[/TABLE]
It would read the information above, and move the first line for the Boat to a sheet called "Sea"..then copy the entire line for Yacht to the next line in the "Sea" sheet. Then it'll do the same for anything in Land, Air and any others that we will need to make.
OR...
If there is a way for me to have a Macro that reads what I have in "Air" sheet, it will copy any new (unmatched) Air lines from the updated/daily sheet that I receive. That would actually be best. That action would be based off the Unique Tag ID (Like the last 2 lines in my example...if the 1st "Plane 2 Air" was already listed in the "Air" sheet, it would skip that one.
Thank you everyone in advance!
I've bee searching around and I've found some threads that are similar to what I'm trying to do but small differences completely change the results.
I have a spreadsheet that is e-mailed to me daily. It has hundreds of lines that need to be separated into 7 or so sheets.
The code needs to find a specific word in "D" column (per row) to determine what sheet it copies that row to.
Example:
[TABLE="width: 452"]
<colgroup><col width="151" style="width: 113pt;" span="4"> <tbody>[TR]
[TD="width: 151, bgcolor: transparent"]Tag ID
[/TD]
[TD="width: 151, bgcolor: transparent"]Item Number[/TD]
[TD="width: 151, bgcolor: transparent"]Rate[/TD]
[TD="width: 151, bgcolor: transparent"]Description[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]243567742[/TD]
[TD="bgcolor: transparent"]AAJ07541[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Boat Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]453643564[/TD]
[TD="bgcolor: transparent"]A0721421[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Ski Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]123452345[/TD]
[TD="bgcolor: transparent"]A0257J25[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Boat Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]675856788[/TD]
[TD="bgcolor: transparent"]A0257J25[/TD]
[TD="bgcolor: transparent"]C[/TD]
[TD="bgcolor: transparent"]Yacht Sea[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]345674577[/TD]
[TD="bgcolor: transparent"]A0D1J124[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Car Land[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]536785683[/TD]
[TD="bgcolor: transparent"]A04152D2[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Truck Land[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]456846657[/TD]
[TD="bgcolor: transparent"]A0D1J17J[/TD]
[TD="bgcolor: transparent"]Z[/TD]
[TD="bgcolor: transparent"]Bike Land[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]234523456[/TD]
[TD="bgcolor: transparent"]A222A251[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Glider Air[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]244565436[/TD]
[TD="bgcolor: transparent"]A0D02424[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Plane Air[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]234456425[/TD]
[TD="bgcolor: transparent"]AA1D10A2[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Plane 2 Air[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]765753648[/TD]
[TD="bgcolor: transparent"]AA234FS2
[/TD]
[TD="bgcolor: transparent"]E[/TD]
[TD="bgcolor: transparent"]Plane 2 Air[/TD]
[/TR]
</tbody>[/TABLE]
It would read the information above, and move the first line for the Boat to a sheet called "Sea"..then copy the entire line for Yacht to the next line in the "Sea" sheet. Then it'll do the same for anything in Land, Air and any others that we will need to make.
OR...
If there is a way for me to have a Macro that reads what I have in "Air" sheet, it will copy any new (unmatched) Air lines from the updated/daily sheet that I receive. That would actually be best. That action would be based off the Unique Tag ID (Like the last 2 lines in my example...if the 1st "Plane 2 Air" was already listed in the "Air" sheet, it would skip that one.
Thank you everyone in advance!