J
Jentan
I am trying to categorise different information into different sheets
within the same file.
A B C D E
1 000514329214734 29/06/2006 INEXC 0740 INLAND EXCHANGE COMM
2 000514329214734 29/06/2006 7100 0740 424280606
*
3 000514329214734 29/06/2006 RINEXC 0740 INLAND EXCHANGE COMM
4 000514329214734 29/06/2006 7100 0740 424290606
*
5 000514329214734 29/06/2006 RTNCHQSR 0740 INLAND EXCHANGE COMM
6 000514329214734 29/06/2006 7100 0740 424290606
*
7 000514329214734 29/06/2006 INEXC 0105 INLAND EXCHANGE COMM
I have using the following macro command but somehow or rather it does
not work. I wanted to transfer all the "INEXC", "RINEXC","RTNCHQSR" in
column C to another new sheet named as "Chrg". Is my command wrong?
lastrow = WorksheetFunction.Count(Columns(10))
For i = 1 To lastrow
If Cells(i, 3) = "INEXC" Or Cells(i, 3) = "RINEXC" _
Or Cells(i, 3) = "RTNCHQSR" Or Cells(i, 3) = "RTNCHQSC" _
Then
Range(i & ":" & i).Cut Sheets("Chrg").Range("A" & j)
j = j + 1
End If
Appreciate for assistance
within the same file.
A B C D E
1 000514329214734 29/06/2006 INEXC 0740 INLAND EXCHANGE COMM
2 000514329214734 29/06/2006 7100 0740 424280606
*
3 000514329214734 29/06/2006 RINEXC 0740 INLAND EXCHANGE COMM
4 000514329214734 29/06/2006 7100 0740 424290606
*
5 000514329214734 29/06/2006 RTNCHQSR 0740 INLAND EXCHANGE COMM
6 000514329214734 29/06/2006 7100 0740 424290606
*
7 000514329214734 29/06/2006 INEXC 0105 INLAND EXCHANGE COMM
I have using the following macro command but somehow or rather it does
not work. I wanted to transfer all the "INEXC", "RINEXC","RTNCHQSR" in
column C to another new sheet named as "Chrg". Is my command wrong?
lastrow = WorksheetFunction.Count(Columns(10))
For i = 1 To lastrow
If Cells(i, 3) = "INEXC" Or Cells(i, 3) = "RINEXC" _
Or Cells(i, 3) = "RTNCHQSR" Or Cells(i, 3) = "RTNCHQSC" _
Then
Range(i & ":" & i).Cut Sheets("Chrg").Range("A" & j)
j = j + 1
End If
Appreciate for assistance