Compare 2 columns of names and report
Closed
traveller20
-
21 Oct 2010 à 05:09
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 21 Oct 2010 à 07:41
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 21 Oct 2010 à 07:41
Related:
- Compare 2 columns of names and report
- Tentacle locker 2 app store - Download - Adult games
- Beyond compare - Download - File management
- My cute roommate 2 - Download - Adult games
- Fnia 2 - Download - Adult games
- Feeding frenzy 2 - Download - Arcade
5 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
21 Oct 2010 à 05:35
21 Oct 2010 à 05:35
in sheet1 and sheet2 row 1 is having row headings.
in that case try this mcro
in that case try this mcro
Sub test()
Dim r As Range, c As Range, dest As Range
Dim cfind As Range, x As String
With Worksheets("sheet1")
Set r = Range(.Range("c2"), .Range("c2").End(xlDown))
For Each c In r
x = c.Value
With Worksheets("sheet2").Columns("c:c")
Set cfind = .Cells.Find(what:=x, lookat:=xlWhole, LookIn:=xlValues)
If cfind Is Nothing Then GoTo nextc
cfind.EntireRow.Copy
With Worksheets("sheet3")
Set dest = .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
dest.PasteSpecial
End With
End With
nextc:
Next c
End With
End Sub
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
21 Oct 2010 à 05:41
21 Oct 2010 à 05:41
SORRY I forgot to add one important instruction
in sheet 1 and sheet 2 in c2 type the formula
=A2&B2
copy C2 down in both the sheets.
THEN ONLY RUN THE MACRO "TEST"
in sheet 1 and sheet 2 in c2 type the formula
=A2&B2
copy C2 down in both the sheets.
THEN ONLY RUN THE MACRO "TEST"
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
21 Oct 2010 à 07:41
21 Oct 2010 à 07:41
the required information is copied to sheet 3. anyhow I shall modify the macro tomorrow morning