I have data stored in three columns of Excel.
Column A: Product no,
Column B: Production site
Column C: Sales code
I need to check the consistency of the first 6 digits in the Sales Code for each product no.
So for example, for all products with product no. 1, I need to check if the first 6 digits in the sales codes are equal. If all sales codes for product no. 1 are equal, the program must write Y
for Yes in Column D. If the sales codes are different, the program must write N
for No in Column D.
Product;Site;Sales code
1;A;86451001
1;B;864510.3
1;C;86451004
1;D;86451001
1;E;864510.3
1;F;86451004
1;G;86451001
1;H;864510.3
1;I;86451004
1;J;86451001
1;K;874507.3
1;L;87450704
1;M;87450701
1;N;885656.3
1;O;88565604
2;A;86451001
2;B;864510.3
2;C;86451004
2;D;86451001
2;E;864510.3
2;F;88565604
2;G;88565601
2;H;864510.3
2;I;86451004
2;J;86451001
2;K;874507.3
2;L;87450704
2;M;87450701
2;N;885656.3
3;A;88565604
3;B;86451001
3;C;864510.3
3;D;86451004
3;E;87450704
I need this check of the consistency because my data set is huge. I’m a beginner with VBA, so I have no clue of how to do this.
Do you have any tips?