Dazzawm
Well-known Member
- Joined
- Jan 24, 2011
- Messages
- 3,783
- Office Version
- 365
- Platform
- Windows
I have a file as laid out below. I need the code to look at column C and if the data matches then look at column AC. If all the data in column AC says 'NYA' then copy to sheet 2 like the second example. Thanks.
Excel 2010
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]18[/TD]
[TD="align: center"]19[/TD]
</tbody>
As you can see below I have highlighted in yellow what needs to be copied as the data in C matches and in column AC they say NYA.
Excel 2010
C | AC | |
---|---|---|
CatCode | StockCode | |
AAROC18 3001 | NYA | |
AAROC18 3001 | NYA | |
AAROC22D 3001 | NYA | |
AAROC22D 3001 | NYA | |
AM40004D 1001 | NYA | |
AM40004D 1001 | NYA | |
AM40004D 1001 | NYA | |
AM50005 1001 | NYA | |
AM50005 7001 | TEST | |
AM50005 7001 | NYA | |
AM50005D 1001 | NYA | |
AM50005D 1001 | NYA | |
AM50005D 5001 | TEST | |
AM50005D 5001 | NYA | |
AM50005D 5001 | NYA | |
AM50005D 7001 | NYA | |
AMCIT04D 1001 | TEST | |
AMCIT04D 1001 | NYA |
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]18[/TD]
[TD="align: center"]19[/TD]
</tbody>
Sheet1
As you can see below I have highlighted in yellow what needs to be copied as the data in C matches and in column AC they say NYA.
Excel 2010 | ||||
---|---|---|---|---|
C | AC | |||
1 | CatCode | StockCode | ||
2 | AAROC18 3001 | NYA | ||
3 | AAROC18 3001 | NYA | ||
4 | AAROC22D 3001 | NYA | ||
5 | AAROC22D 3001 | NYA | ||
6 | AM40004D 1001 | NYA | ||
7 | AM40004D 1001 | NYA | ||
8 | AM40004D 1001 | NYA | ||
9 | AM50005 1001 | NYA | ||
10 | AM50005 7001 | TEST | ||
11 | AM50005 7001 | NYA | ||
12 | AM50005D 1001 | NYA | ||
13 | AM50005D 1001 | NYA | ||
14 | AM50005D 5001 | TEST | ||
15 | AM50005D 5001 | NYA | ||
16 | AM50005D 5001 | NYA | ||
17 | AM50005D 7001 | NYA | ||
18 | AMCIT04D 1001 | TEST | ||
19 | AMCIT04D 1001 | NYA | ||
Sheet2 |
Last edited: