Related:
- Vba - compare two sheets
- Vba case like - Guide
- Beyond compare - Download - File management
- Sheets right to left - Guide
- Number to words in excel formula without vba - Guide
- Excel compare two sheets - Guide
4 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 6, 2012 at 10:36 PM
Jan 6, 2012 at 10:36 PM
sheet 1 is like this
name data
a 1
s 2
d 3
f 4
g 5
h 6
j 7
k 8
l 9
sheet 2 is
name data
a 1
d 3
g 5
j 7
l 9
COPY SHEET 1 IN SHEET3 FROM a1
now try this macro test
name data
a 1
s 2
d 3
f 4
g 5
h 6
j 7
k 8
l 9
sheet 2 is
name data
a 1
d 3
g 5
j 7
l 9
COPY SHEET 1 IN SHEET3 FROM a1
now try this macro test
Sub test() Dim c() As String, j As Long, k As Long, cfind As Range With Worksheets("sheet2") j = WorksheetFunction.CountA(.Columns("A:A")) - 1 ReDim c(1 To j) For k = 1 To j c(k) = .Cells(k + 1, 1).Value Next k With Worksheets("sheet1") For k = 1 To j Set cfind = .Cells.Find(what:=c(k), lookat:=xlWhole) If Not cfind Is Nothing Then 'cfind.Select cfind.EntireRow.Delete End If Next k End With End With End Sub
Sub undo() Worksheets("sheet1").Cells.Clear Worksheets("sheet3").Cells.Copy Worksheets("sheet1").Range("A1") End Sub
Hi Venkat 1926
your help is very good, thx a lot for your kindly cooperation.
Just one thing, to improve the speed I did:
Application.ScreenUpdating = False
'YOUR CODE
Application.ScreenUpdating = True
Can you suggest me something else to speed up the excecution time with thousands of rows?
For me also earning one second is helpful...
thx again Venkat ;)
your help is very good, thx a lot for your kindly cooperation.
Just one thing, to improve the speed I did:
Application.ScreenUpdating = False
'YOUR CODE
Application.ScreenUpdating = True
Can you suggest me something else to speed up the excecution time with thousands of rows?
For me also earning one second is helpful...
thx again Venkat ;)
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 7, 2012 at 11:40 PM
Jan 7, 2012 at 11:40 PM
not able to think any simpler way at present. sorry.
if it is more than 20000 rows better use access
if it is more than 20000 rows better use access