my data is
[TABLE="width: 189"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Pos[/TD]
[TD]0 Subs[/TD]
[TD]1 subs[/TD]
[TD]2 sub[/TD]
[TD]Sub[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
1 subs- 1 pos and 2 sub then in 1 subs ZERO and in 2 sub its 1
1 subs-1 pos and 1 sub then in 1 subs 1 and 0 subs its 1
2 subs-2 pos and 2 sub then in 1 subs 2
2 subs -2 pos and 3 sub then in 1 subs 1 and two sub 1
3 subs - 3 pos and 3 sub then in 1 subs 3
3 subs - 3 pos and 4 sub then in 1 subs 2 and two sub 1
3 subs - 3 pos and 5 sub then in 1 subs 1 and two sub 2
3 subs - 3 pos and 6 sub then in 1 subs its 3
more than 3 subs - 2 pos with more than 4 subs its 2 sub in 2 sub
Basically i need a if condition to get 1 sub and 2 sub based on pos value
2 pos means actual 4 subs need to be there if so 2 subs will be 2
2 pos with only 3 subs then 1 subs will have 1 and on in 1 subs
[TABLE="width: 189"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Pos[/TD]
[TD]0 Subs[/TD]
[TD]1 subs[/TD]
[TD]2 sub[/TD]
[TD]Sub[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
1 subs- 1 pos and 2 sub then in 1 subs ZERO and in 2 sub its 1
1 subs-1 pos and 1 sub then in 1 subs 1 and 0 subs its 1
2 subs-2 pos and 2 sub then in 1 subs 2
2 subs -2 pos and 3 sub then in 1 subs 1 and two sub 1
3 subs - 3 pos and 3 sub then in 1 subs 3
3 subs - 3 pos and 4 sub then in 1 subs 2 and two sub 1
3 subs - 3 pos and 5 sub then in 1 subs 1 and two sub 2
3 subs - 3 pos and 6 sub then in 1 subs its 3
more than 3 subs - 2 pos with more than 4 subs its 2 sub in 2 sub
Basically i need a if condition to get 1 sub and 2 sub based on pos value
2 pos means actual 4 subs need to be there if so 2 subs will be 2
2 pos with only 3 subs then 1 subs will have 1 and on in 1 subs