Sub UniqueValues()
Dim Sh1 As String, Sh2 As String, ws As Worksheet, lRow As Long, lRow2 As Long, Rg As Range
Sh1 = "Sheet1" ' Change the sheet name as needed
Sh2 = "Sheet2" ' Change the sheet name as needed
'Creating a new sheet to show non-duplicate values
For Each ws In Worksheets
If ws.Name = "UniqueValues" Then
If MsgBox("There is an already existing sheet called ""UniqueValues"", if you continue the sheet will be deleted & a new one will be created" & vbNewLine & "Continue?", vbExclamation + vbYesNo) = vbNo Then
Exit Sub
Else:
Application.DisplayAlerts = False
Sheets("UniqueValues").Delete
Application.DisplayAlerts = True
End If
End If
Next
'Create the new sheet after making sure it doesn't exist
Sheets.Add.Name = ("UniqueValues")
'Find the last row in the first sheet & copy the data to the new sheet
lRow = Sheets(Sh1).Range("E" & Rows.Count).End(xlUp).Row
Set Rg = Sheets(Sh1).Range("E1:E" & lRow)
Sheets("UniqueValues").Range("A1:A" & lRow) = Rg.Value
'Find the last row in the second sheet & copy the data to the new sheet
lRow2 = Sheets("UniqueValues").Range("A" & Rows.Count).End(xlUp).Row + 1
lRow = Sheets(Sh2).Range("E" & Rows.Count).End(xlUp).Row
Set Rg = Sheets(Sh2).Range("E1:E" & lRow)
Sheets("UniqueValues").Range("A" & lRow2 & ":A" & lRow + lRow2 - 1) = Rg.Value
'Remove the duplicates on the newly created sheet to show unique values only
lRow2 = Sheets("UniqueValues").Range("A" & Rows.Count).End(xlUp).Row
Sheets("UniqueValues").Range("A1:A" & lRow2).RemoveDuplicates Columns:=1, Header:=xlNo
End Sub