Solved

VBA this

Posted on 2013-05-24
3
314 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

710 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