mrinal saha
Board Regular
- Joined
- Jan 20, 2009
- Messages
- 229
Hi All,
I am using logic of right function in vba but somehow its is working...
What I am looking for is, if the cell doesn't end with US or PR, cut the row and paste it at the top of the data. Inspite, it cuts everyrow and paste it on the top one by one regardless the parameters.
For a = 7 To rownum - 2
If Right(Cells(a, 7).Value, 2) <> "US" Or Right(Cells(a, 7).Value, 2) <> "PR" Then
Cells(a, 7).EntireRow.Cut
Rows("6:6").Select
Selection.Insert Shift:=xlDown
End If
Next a
Any help would be appreciated...Many thanks.
regards,
Mrinal
I am using logic of right function in vba but somehow its is working...
What I am looking for is, if the cell doesn't end with US or PR, cut the row and paste it at the top of the data. Inspite, it cuts everyrow and paste it on the top one by one regardless the parameters.
For a = 7 To rownum - 2
If Right(Cells(a, 7).Value, 2) <> "US" Or Right(Cells(a, 7).Value, 2) <> "PR" Then
Cells(a, 7).EntireRow.Cut
Rows("6:6").Select
Selection.Insert Shift:=xlDown
End If
Next a
Any help would be appreciated...Many thanks.
regards,
Mrinal