Compile list from multiple worksheets

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
I have multiple worksheets with item names in column A and their corresponding colours in column B, of each worksheet. Each sheet may often have different item names in column A, same names but different colours and their positions may change based on their ranking.

I want to compile a list of these names that appear in column A across all worksheets on to a new worksheet without duplicates except only where colour variance is concerned.

Any ideas how I can do this?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Anyone?

I just need to make a master list using all names that appear in column A of multiple worksheets, column B as a supporting criteria and where duplicates are automatically discarded
 
Upvote 0
Try this

Create a sheet called "Master"

Code:
Sub Macro4()
  Dim sh As Worksheet, sh2 As Worksheet
  Set sh = Sheets("[COLOR=#0000ff]Master[/COLOR]")
  sh.Columns("A:B").ClearContents
  For Each sh2 In Sheets
    If sh2.Name <> sh.Name Then
      sh2.Range("A1:B" & sh2.Range("A" & Rows.Count).End(xlUp).Row).Copy
      sh.Range("A" & Rows.Count).End(xlUp)(2).PasteSpecial xlPasteValues
    End If
  Next
  sh.Range("A1:B" & sh.Range("A" & Rows.Count).End(xlUp).Row).RemoveDuplicates Columns:=Array(1, 2), Header:=xlNo
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,507
Messages
6,114,029
Members
448,543
Latest member
MartinLarkin

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