Hi
In my worksheet I have some columns with headers as NM1*IL*1 - Member Name, NM1*IL*1 - Dependent Name1, NM1*IL*1 - Dependent Name2, NM1*IL*1 - Dependent Name3 etc. along with other columns which has different headers.
I need to check the data in the columns only which has header beginning with NM1*IL*1 and print the error message in another sheet.
The data check that I need to do is to check the number of * in the cells. If the number of * characters is not eqaual to 9 or 4 or 5 it will print error message.
Below is the original worksheet:
[TABLE="width: 1756"]
<tbody>[TR]
[TD]DTP*356* - Member Dates[/TD]
[TD]NM1*IL*1 - Member Name[/TD]
[TD]PER* - Member Communications[/TD]
[TD]NM1*IL*1 - Dependent Name1[/TD]
[TD]NM1*IL*1 - Dependent Name2[/TD]
[TD]DTP*356* - Dependent Dates3[/TD]
[TD]NM1*IL*1 - Dependent Name3[/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20030101~[/TD]
[TD]NM1*IL*1*Test*ADAM*C***34*111222333~[/TD]
[TD]PER*IP**TE*3174142326~[/TD]
[TD]NM1*IL*1TestALICE*W~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20040301~[/TD]
[TD]NM1*IL*1*Test*CHARLES*A****34*111222333~[/TD]
[TD]PER*IP**TE*7087498828~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[TD][/TD]
[TD]DTP*356*D8*20040301~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20040101~[/TD]
[TD]NM1*IL*1*Test*CARRIE*M***34*111222333~[/TD]
[TD]PER*IP**TE*2135551420~[/TD]
[TD]NM1*IL*1*Test*ALICE~[/TD]
[TD][/TD]
[TD]DTP*356*D8*20040101~[/TD]
[TD]NM1*IL*1TestALICE*W~[/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20020101~[/TD]
[TD]NM1*IL*1*Test*HERSCHEL*D***34**33331122~[/TD]
[TD]PER*IP**TE*6158346201~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[TD]NM1*IL*1TestALICE*W~[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The error sheet should show as:
[TABLE="width: 145"]
<tbody>[TR]
[TD]Error in Row2,ColumnD[/TD]
[/TR]
[TR]
[TD]Error in Row3,ColumnB[/TD]
[/TR]
[TR]
[TD]Error in Row4,ColumnG[/TD]
[/TR]
[TR]
[TD]Error in Row5,ColumnB[/TD]
[/TR]
[TR]
[TD]Error in Row5,ColumnE[/TD]
[/TR]
</tbody>[/TABLE]
In my worksheet I have some columns with headers as NM1*IL*1 - Member Name, NM1*IL*1 - Dependent Name1, NM1*IL*1 - Dependent Name2, NM1*IL*1 - Dependent Name3 etc. along with other columns which has different headers.
I need to check the data in the columns only which has header beginning with NM1*IL*1 and print the error message in another sheet.
The data check that I need to do is to check the number of * in the cells. If the number of * characters is not eqaual to 9 or 4 or 5 it will print error message.
Below is the original worksheet:
[TABLE="width: 1756"]
<tbody>[TR]
[TD]DTP*356* - Member Dates[/TD]
[TD]NM1*IL*1 - Member Name[/TD]
[TD]PER* - Member Communications[/TD]
[TD]NM1*IL*1 - Dependent Name1[/TD]
[TD]NM1*IL*1 - Dependent Name2[/TD]
[TD]DTP*356* - Dependent Dates3[/TD]
[TD]NM1*IL*1 - Dependent Name3[/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20030101~[/TD]
[TD]NM1*IL*1*Test*ADAM*C***34*111222333~[/TD]
[TD]PER*IP**TE*3174142326~[/TD]
[TD]NM1*IL*1TestALICE*W~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20040301~[/TD]
[TD]NM1*IL*1*Test*CHARLES*A****34*111222333~[/TD]
[TD]PER*IP**TE*7087498828~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[TD][/TD]
[TD]DTP*356*D8*20040301~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20040101~[/TD]
[TD]NM1*IL*1*Test*CARRIE*M***34*111222333~[/TD]
[TD]PER*IP**TE*2135551420~[/TD]
[TD]NM1*IL*1*Test*ALICE~[/TD]
[TD][/TD]
[TD]DTP*356*D8*20040101~[/TD]
[TD]NM1*IL*1TestALICE*W~[/TD]
[/TR]
[TR]
[TD]DTP*356*D8*20020101~[/TD]
[TD]NM1*IL*1*Test*HERSCHEL*D***34**33331122~[/TD]
[TD]PER*IP**TE*6158346201~[/TD]
[TD]NM1*IL*1*Test*ALICE*W~[/TD]
[TD]NM1*IL*1TestALICE*W~[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The error sheet should show as:
[TABLE="width: 145"]
<tbody>[TR]
[TD]Error in Row2,ColumnD[/TD]
[/TR]
[TR]
[TD]Error in Row3,ColumnB[/TD]
[/TR]
[TR]
[TD]Error in Row4,ColumnG[/TD]
[/TR]
[TR]
[TD]Error in Row5,ColumnB[/TD]
[/TR]
[TR]
[TD]Error in Row5,ColumnE[/TD]
[/TR]
</tbody>[/TABLE]