jeevaaustin
New Member
- Joined
- Jun 29, 2013
- Messages
- 4
Hello Guru's,
I am new to this form and VB macro i need help ..
I get a file where i have some data , its as below if the total dr is not equal to cr then i want the data to be copied to a new sheet ...how can i create a macro for this ?
[TABLE="width: 448"]
<tbody>[TR]
[TD="class: xl63, width: 64"]Line[/TD]
[TD="class: xl63, width: 64"]Account[/TD]
[TD="class: xl63, width: 64"]Desc[/TD]
[TD="class: xl63, width: 64"]dr[/TD]
[TD="class: xl63, width: 64"]cr[/TD]
[TD="class: xl63, width: 64"]dr[/TD]
[TD="class: xl63, width: 64"]cr[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63, align: right"]123[/TD]
[TD="class: xl63"]test1[/TD]
[TD="class: xl63, align: right"]10[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63, align: right"]345[/TD]
[TD="class: xl63"]test2[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]14[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]total[/TD]
[TD="class: xl63, align: right"]26[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"]Line[/TD]
[TD="class: xl63"]Account[/TD]
[TD="class: xl63"]Desc[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63, align: right"]123[/TD]
[TD="class: xl63"]test1[/TD]
[TD="class: xl63, align: right"]10[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63, align: right"]345[/TD]
[TD="class: xl63"]test2[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]4[/TD]
[TD="class: xl63, align: right"]9393[/TD]
[TD="class: xl63"]test3[/TD]
[TD="class: xl63, align: right"]15[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]15[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]total[/TD]
[TD="class: xl63, align: right"]27[/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl63"]Line[/TD]
[TD="class: xl63"]Account[/TD]
[TD="class: xl63"]Desc[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63, align: right"]345[/TD]
[TD="class: xl63"]test8[/TD]
[TD="class: xl63, align: right"]10[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]14[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63, align: right"]234[/TD]
[TD="class: xl63"]test1[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]total[/TD]
[TD="class: xl63, align: right"]14[/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
</tbody>[/TABLE]
result i am looking for :
[TABLE="width: 448"]
<tbody>[TR]
[TD="class: xl65, width: 64"]Line[/TD]
[TD="class: xl65, width: 64"]Account[/TD]
[TD="class: xl65, width: 64"]Desc[/TD]
[TD="class: xl65, width: 64"]dr[/TD]
[TD="class: xl65, width: 64"]cr[/TD]
[TD="class: xl65, width: 64"]dr[/TD]
[TD="class: xl65, width: 64"]cr[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]123[/TD]
[TD="class: xl65"]test1[/TD]
[TD="class: xl65, align: right"]10[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]345[/TD]
[TD="class: xl65"]test2[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]14[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]total[/TD]
[TD="class: xl65, align: right"]26[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65"]Line[/TD]
[TD="class: xl65"]Account[/TD]
[TD="class: xl65"]Desc[/TD]
[TD="class: xl65"]dr[/TD]
[TD="class: xl65"]cr[/TD]
[TD="class: xl65"]dr[/TD]
[TD="class: xl65"]cr[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]123[/TD]
[TD="class: xl65"]test1[/TD]
[TD="class: xl65, align: right"]10[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]345[/TD]
[TD="class: xl65"]test2[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]9393[/TD]
[TD="class: xl65"]test3[/TD]
[TD="class: xl65, align: right"]15[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]15[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]total[/TD]
[TD="class: xl65, align: right"]27[/TD]
[TD="class: xl65, align: right"]14[/TD]
[/TR]
</tbody>[/TABLE]
I am new to this form and VB macro i need help ..
I get a file where i have some data , its as below if the total dr is not equal to cr then i want the data to be copied to a new sheet ...how can i create a macro for this ?
[TABLE="width: 448"]
<tbody>[TR]
[TD="class: xl63, width: 64"]Line[/TD]
[TD="class: xl63, width: 64"]Account[/TD]
[TD="class: xl63, width: 64"]Desc[/TD]
[TD="class: xl63, width: 64"]dr[/TD]
[TD="class: xl63, width: 64"]cr[/TD]
[TD="class: xl63, width: 64"]dr[/TD]
[TD="class: xl63, width: 64"]cr[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63, align: right"]123[/TD]
[TD="class: xl63"]test1[/TD]
[TD="class: xl63, align: right"]10[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63, align: right"]345[/TD]
[TD="class: xl63"]test2[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]14[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]total[/TD]
[TD="class: xl63, align: right"]26[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"]Line[/TD]
[TD="class: xl63"]Account[/TD]
[TD="class: xl63"]Desc[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63, align: right"]123[/TD]
[TD="class: xl63"]test1[/TD]
[TD="class: xl63, align: right"]10[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63, align: right"]345[/TD]
[TD="class: xl63"]test2[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]4[/TD]
[TD="class: xl63, align: right"]9393[/TD]
[TD="class: xl63"]test3[/TD]
[TD="class: xl63, align: right"]15[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]15[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]total[/TD]
[TD="class: xl63, align: right"]27[/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl63"]Line[/TD]
[TD="class: xl63"]Account[/TD]
[TD="class: xl63"]Desc[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[TD="class: xl63"]dr[/TD]
[TD="class: xl63"]cr[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]1[/TD]
[TD="class: xl63, align: right"]345[/TD]
[TD="class: xl63"]test8[/TD]
[TD="class: xl63, align: right"]10[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63, align: right"]14[/TD]
[TD="class: xl63, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]2[/TD]
[TD="class: xl63, align: right"]234[/TD]
[TD="class: xl63"]test1[/TD]
[TD="class: xl63, align: right"]12[/TD]
[TD="class: xl63, align: right"]0[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]total[/TD]
[TD="class: xl63, align: right"]14[/TD]
[TD="class: xl63, align: right"]14[/TD]
[/TR]
</tbody>[/TABLE]
result i am looking for :
[TABLE="width: 448"]
<tbody>[TR]
[TD="class: xl65, width: 64"]Line[/TD]
[TD="class: xl65, width: 64"]Account[/TD]
[TD="class: xl65, width: 64"]Desc[/TD]
[TD="class: xl65, width: 64"]dr[/TD]
[TD="class: xl65, width: 64"]cr[/TD]
[TD="class: xl65, width: 64"]dr[/TD]
[TD="class: xl65, width: 64"]cr[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]123[/TD]
[TD="class: xl65"]test1[/TD]
[TD="class: xl65, align: right"]10[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]345[/TD]
[TD="class: xl65"]test2[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]14[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]total[/TD]
[TD="class: xl65, align: right"]26[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65"]Line[/TD]
[TD="class: xl65"]Account[/TD]
[TD="class: xl65"]Desc[/TD]
[TD="class: xl65"]dr[/TD]
[TD="class: xl65"]cr[/TD]
[TD="class: xl65"]dr[/TD]
[TD="class: xl65"]cr[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1[/TD]
[TD="class: xl65, align: right"]123[/TD]
[TD="class: xl65"]test1[/TD]
[TD="class: xl65, align: right"]10[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl65, align: right"]345[/TD]
[TD="class: xl65"]test2[/TD]
[TD="class: xl65, align: right"]12[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65, align: right"]14[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]4[/TD]
[TD="class: xl65, align: right"]9393[/TD]
[TD="class: xl65"]test3[/TD]
[TD="class: xl65, align: right"]15[/TD]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl65, align: right"]15[/TD]
[TD="class: xl65, align: right"]0[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]total[/TD]
[TD="class: xl65, align: right"]27[/TD]
[TD="class: xl65, align: right"]14[/TD]
[/TR]
</tbody>[/TABLE]