Hi experts! I'm posting this thread hoping for an answer to my not-so-complicated requirement in excel. I was browsing through the web and came across MrExcel and found most of the relevant threads from here.
I need a macro/VBA in excel where I can find and extract word/s from a cell or column and paste them to another cell whether in the same sheet or another.
Here's a sample scenario.
Sentences splitted into many line breaks will be pasted to Column A, so here's what is going to look like.
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]This is a sample message.[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John Smith[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]AB 123 CDE FGH[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]AB Apple[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]CDE Dog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]FGH Cat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need to paste the words to Column C to arrange them properly with Column B as the corresponding field names.
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]This is a sample message.[/TD]
[TD]Name:[/TD]
[TD]John Smith[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John Smith[/TD]
[TD]Blood:[/TD]
[TD]AB[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]AB 34 CDE FGH[/TD]
[TD]Age:[/TD]
[TD]34[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]AB Apple[/TD]
[TD]Fruit:[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]CDE Dog[/TD]
[TD]Pet1:[/TD]
[TD]Dog[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]FGH Cat[/TD]
[TD]Pet2:[/TD]
[TD]Cat[/TD]
[/TR]
</tbody>[/TABLE]
In the above table, we assumed that the 2nd row is the Name, while the 3rd is the blood type followed by the age.
I would also appreciate if you can guide me in creating macro statements like in the table above, the CDE (which means Dog in the example) is present in Column A, therefor, Pet1 is generated as Dog instead of CDE. Same goes with the FGH/Cat.
Guys, I really hope you could help me with this macro. I would greatly ease up our daily process of segregating data in Excel.
Thank you in advance!
I need a macro/VBA in excel where I can find and extract word/s from a cell or column and paste them to another cell whether in the same sheet or another.
Here's a sample scenario.
Sentences splitted into many line breaks will be pasted to Column A, so here's what is going to look like.
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]This is a sample message.[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John Smith[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]AB 123 CDE FGH[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]AB Apple[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]CDE Dog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]FGH Cat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need to paste the words to Column C to arrange them properly with Column B as the corresponding field names.
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]This is a sample message.[/TD]
[TD]Name:[/TD]
[TD]John Smith[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John Smith[/TD]
[TD]Blood:[/TD]
[TD]AB[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]AB 34 CDE FGH[/TD]
[TD]Age:[/TD]
[TD]34[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]AB Apple[/TD]
[TD]Fruit:[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]CDE Dog[/TD]
[TD]Pet1:[/TD]
[TD]Dog[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]FGH Cat[/TD]
[TD]Pet2:[/TD]
[TD]Cat[/TD]
[/TR]
</tbody>[/TABLE]
In the above table, we assumed that the 2nd row is the Name, while the 3rd is the blood type followed by the age.
I would also appreciate if you can guide me in creating macro statements like in the table above, the CDE (which means Dog in the example) is present in Column A, therefor, Pet1 is generated as Dog instead of CDE. Same goes with the FGH/Cat.
Guys, I really hope you could help me with this macro. I would greatly ease up our daily process of segregating data in Excel.
Thank you in advance!