Hey everyone,
I am very new to VBA Programming so let me know if anyone needs more information. I am trying to write a VBA macro that will search columns F, H, and J in Sheet1 of my workbook and compare those values to column A of Sheet2. If there is a match, I would like to copy the values on Sheet2 that are 3 cells over (to the right) from the match on Sheet2 and paste that value one cell over (to the right) to the matching value in Sheet1. For example, if the first table is 'Sheet1' and the second table is 'Sheet2', I would like the result to look like the third table. Any help would be greatly appreciated. Thanks!
[TABLE="width: 500"]
<tbody>[TR]
[TD]SHEET1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]Find1[/TD]
[TD][/TD]
[TD]Find2[/TD]
[TD][/TD]
[TD]Find3[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]SHEET2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]Find1[/TD]
[TD][/TD]
[TD][/TD]
[TD]1.5
[/TD]
[/TR]
[TR]
[TD]Find2[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Find3[/TD]
[TD][/TD]
[TD][/TD]
[TD]2.5[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]SHEET1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]Find1[/TD]
[TD]1.5[/TD]
[TD]Find2[/TD]
[TD]2[/TD]
[TD]Find3[/TD]
[TD]2.5[/TD]
[/TR]
</tbody>[/TABLE]
I am very new to VBA Programming so let me know if anyone needs more information. I am trying to write a VBA macro that will search columns F, H, and J in Sheet1 of my workbook and compare those values to column A of Sheet2. If there is a match, I would like to copy the values on Sheet2 that are 3 cells over (to the right) from the match on Sheet2 and paste that value one cell over (to the right) to the matching value in Sheet1. For example, if the first table is 'Sheet1' and the second table is 'Sheet2', I would like the result to look like the third table. Any help would be greatly appreciated. Thanks!
[TABLE="width: 500"]
<tbody>[TR]
[TD]SHEET1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]Find1[/TD]
[TD][/TD]
[TD]Find2[/TD]
[TD][/TD]
[TD]Find3[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]SHEET2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]Find1[/TD]
[TD][/TD]
[TD][/TD]
[TD]1.5
[/TD]
[/TR]
[TR]
[TD]Find2[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Find3[/TD]
[TD][/TD]
[TD][/TD]
[TD]2.5[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]SHEET1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]Find1[/TD]
[TD]1.5[/TD]
[TD]Find2[/TD]
[TD]2[/TD]
[TD]Find3[/TD]
[TD]2.5[/TD]
[/TR]
</tbody>[/TABLE]