Hi All,
I am trying to copy certain data from one Excel Sheet to another (Excel 2010, Windows 7)
As you can see in Sheet 2 Column A - the number represents a Unique personal ID. But multiple entries per user exist.
What I am trying to accomplish is:
IF User ID matches, then copy the Value from Sheet 2 Column C to sheet 1 Column C IF value in Sheet 2 Column B = 1. If the value in Sheet 2 Column B = 9, then it should copy Sheet 1 Column D. All other data is ignored.
This is how it should look as an example on Sheet 1 after running:
I am trying to copy certain data from one Excel Sheet to another (Excel 2010, Windows 7)
Code:
Sheet 1 Data
A B C D
704 Smith
709 Heaton
711 Williams
712 Senior
Sheet 2 Data
A B C
[TABLE="width: 98"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]704[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]48[/TD]
[/TR]
[TR]
[TD="align: right"]704[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]48[/TD]
[/TR]
[TR]
[TD="align: right"]704[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]709[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD="align: right"]709[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD="align: right"]709[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]709[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD="align: right"]711[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]711[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]712[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]712[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]36[/TD]
[/TR]
[TR]
[TD="align: right"]712[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]712[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]12[/TD]
[/TR]
</tbody>[/TABLE]
As you can see in Sheet 2 Column A - the number represents a Unique personal ID. But multiple entries per user exist.
What I am trying to accomplish is:
IF User ID matches, then copy the Value from Sheet 2 Column C to sheet 1 Column C IF value in Sheet 2 Column B = 1. If the value in Sheet 2 Column B = 9, then it should copy Sheet 1 Column D. All other data is ignored.
This is how it should look as an example on Sheet 1 after running:
Code:
A B C D
704 Smith 48
709 Heaton 24 12
711 Williams 36
712 Senior 36 12