Hi All,
I'm new here, but I've used excel and macros occasionally in the last few years. Usually I've been able to figure things out from the posts and replies of others, but this time I'm stuck. So here it goes...
I have 1xWB with 2xWS. WS1 has 3xColumns, WS2 has 1xColumn:
<tbody>[TR]
[TD]ID
[/TD]
[TD]Other Data
[/TD]
[TD]Summary
[/TD]
[/TR]
[TR]
[TD]S990
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S991
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]I599
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S992
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S993
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD]garbage text I don't care about
[/TD]
[/TR]
[TR]
[TD]S992 and some text
[/TD]
[/TR]
[TR]
[TD]some more text 1
[/TD]
[/TR]
[TR]
[TD]Quality: even more text 1
[/TD]
[/TR]
[TR]
[TD]<blank cell=""><blank cell="">--blank cell--</blank></blank>
[/TD]
[/TR]
[TR]
[TD]text I599 and some text
[/TD]
[/TR]
[TR]
[TD]--blank cell--
[/TD]
[/TR]
[TR]
[TD]even more text 2
[/TD]
[/TR]
[TR]
[TD]Quality: just a bit more text 2
[/TD]
[/TR]
[TR]
[TD]<blank cell=""><blank cell="">--blank cell--</blank></blank>
[/TD]
[/TR]
</tbody>[/TABLE]
I'm looking for VBA that will search WS2 for the text in each row of Column A in WS1, and then copy and paste the text in each cell below that until the next cell with "Quality:" as part of the text, into a single cell of the appropriate row of the Description column in WS1. So I get the following in WS1:
<tbody>[TR]
[TD]ID
[/TD]
[TD]Other Data
[/TD]
[TD]Summary
[/TD]
[/TR]
[TR]
[TD]S990
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S991
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]I599
[/TD]
[TD]--stuff--
[/TD]
[TD]text I599 and some text even more text 2 Quality: just a bit more text 2
[/TD]
[/TR]
[TR]
[TD]S992
[/TD]
[TD]--stuff--
[/TD]
[TD]S992 and some text some more text 1 Quality: even more text 1
[/TD]
[/TR]
[TR]
[TD]S993
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
WS1 has about 200 ID values that need to be searched for. WS2 has 5k rows of text that need to be moved to the corresponding ID.
I'd greatly appreciate any help I can get, but please be patient with my non-VBA savvy mind. I can provide additional clarification if required. Thanks and good luck!
-Homeskool
I'm new here, but I've used excel and macros occasionally in the last few years. Usually I've been able to figure things out from the posts and replies of others, but this time I'm stuck. So here it goes...
I have 1xWB with 2xWS. WS1 has 3xColumns, WS2 has 1xColumn:
WS1
[TABLE="class: grid, width: 250"]<tbody>[TR]
[TD]ID
[/TD]
[TD]Other Data
[/TD]
[TD]Summary
[/TD]
[/TR]
[TR]
[TD]S990
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S991
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]I599
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S992
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S993
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
WS2
[TABLE="class: grid, width: 250"]<tbody>[TR]
[TD]garbage text I don't care about
[/TD]
[/TR]
[TR]
[TD]S992 and some text
[/TD]
[/TR]
[TR]
[TD]some more text 1
[/TD]
[/TR]
[TR]
[TD]Quality: even more text 1
[/TD]
[/TR]
[TR]
[TD]<blank cell=""><blank cell="">--blank cell--</blank></blank>
[/TD]
[/TR]
[TR]
[TD]text I599 and some text
[/TD]
[/TR]
[TR]
[TD]--blank cell--
[/TD]
[/TR]
[TR]
[TD]even more text 2
[/TD]
[/TR]
[TR]
[TD]Quality: just a bit more text 2
[/TD]
[/TR]
[TR]
[TD]<blank cell=""><blank cell="">--blank cell--</blank></blank>
[/TD]
[/TR]
</tbody>[/TABLE]
I'm looking for VBA that will search WS2 for the text in each row of Column A in WS1, and then copy and paste the text in each cell below that until the next cell with "Quality:" as part of the text, into a single cell of the appropriate row of the Description column in WS1. So I get the following in WS1:
WS1
[TABLE="class: grid, width: 500"]<tbody>[TR]
[TD]ID
[/TD]
[TD]Other Data
[/TD]
[TD]Summary
[/TD]
[/TR]
[TR]
[TD]S990
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S991
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]I599
[/TD]
[TD]--stuff--
[/TD]
[TD]text I599 and some text even more text 2 Quality: just a bit more text 2
[/TD]
[/TR]
[TR]
[TD]S992
[/TD]
[TD]--stuff--
[/TD]
[TD]S992 and some text some more text 1 Quality: even more text 1
[/TD]
[/TR]
[TR]
[TD]S993
[/TD]
[TD]--stuff--
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
WS1 has about 200 ID values that need to be searched for. WS2 has 5k rows of text that need to be moved to the corresponding ID.
I'd greatly appreciate any help I can get, but please be patient with my non-VBA savvy mind. I can provide additional clarification if required. Thanks and good luck!
-Homeskool