Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA this

Posted on 2013-05-24
3
Medium Priority
?
320 Views
Last Modified: 2013-05-24
Hello,

There are two lists – list one and list two.
VBA does this:
Grab and combine the values from both the list into one single list where are no duplicates.
vbaTHIS.xlsx
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:Rayne
ID: 39194766
a robust code is preffered
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 2000 total points
ID: 39194971
Sub Macro2()
    Range("F3:F" & Rows.Count).ClearContents
    Range("B3:B" & Range("B3").End(xlDown).Row).Copy Range("F3")
    Range("D3:D" & Range("D3").End(xlDown).Row).Copy Range("F3").End(xlDown).Offset(1)
    Range("F3:F" & Range("F3").End(xlDown).Row).RemoveDuplicates Columns:=1, Header:=xlNo
    Range("F3:F" & Range("F3").End(xlDown).Row).Sort Key1:=Worksheets("Sheet1").Range("F1")
End Sub

Open in new window

0
 

Author Comment

by:Rayne
ID: 39195092
thank you Ssaqibh
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
New style of hardware planning for Microsoft Exchange server.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question