Macro to take ten columns, make 1 column and remove dups and put in a row

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,

Please help as i'm having a bit a trouble with this.

I need a macro to do the following for me,

get the data from Columns H,I,J,K,L,M,N,O,P,Q (Starting at Row 53 and down to last row, best to use column D for last row as this always has data in it for every row in use)
make into one column either by putting in sheet "Control" column BB or just in its memory, remove duplicates, the pleace the results in "BG50"

please help if you can

Thanks

Tony
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Do you want BG50 to have the complete list? or do you want the list to be in BG50,BH50 etc?
 
Upvote 0
Based on the title, try
Code:
Sub tonywatsonhelp()
   Dim Ary As Variant
   Dim r As Long, c As Long
   
   Ary = Range("H53", Range("D" & Rows.Count).End(xlUp).Offset(, 13)).Value2
   With CreateObject("scripting.dictionary")
      For c = 1 To UBound(Ary, 2)
         For r = 1 To UBound(Ary)
            .Item(Ary(r, c)) = Empty
         Next r
      Next c
      Range("BG50").Resize(, .Count).Value2 = .Keys
   End With
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top