
Originally Posted by
kushalprakash
Dear Mr. Mrice,
I am very thankful to you for your valuable guidance about macros. my task is running but some problem still there.
my excel raw data having thousands vendor and this macros not going in ooping till all vendors completed. Also Amount column not merging.
Can I sent you Excel file containg my whole data.
I am very hungry about this task. Please help me.
with warm regards
kps rajput
email:
rajputkps@gmail.com
Hi,
Your problem is that you have not really specified how to determine row types that are to be removed from row types that are to be retained.
IF (and only if) the determination is that A len = 6 is to be removed, and others are to be retained then
Sub Macro7()
Dim sCol1 As String, sCol2 As String
Dim iLastRow As Integer, i As Integer
iLastRow = ActiveSheet.Range("A65536").End(xlUp).Row
Range("A1").Select
ActiveCell.EntireColumn.Insert
ActiveCell.EntireColumn.Insert
i = 3 ' Header and blank row ignored
Do
If Len(Cells(i, 3)) = 6 Then
sCol1 = Cells(i, 3)
sCol2 = Cells(i, 4)
Cells(i, 1).EntireRow.Delete
iLastRow = iLastRow - 1
Else
Cells(i, 1) = sCol1
Cells(i, 2) = sCol2
i = i + 1
End If
Loop Until i > iLastRow
End Sub
will do that for you.
hth
---
Bookmarks