1

I need to get the unique values between Column (A) and Column (C) to be shown in Column (E)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

This code:

Sub GetUniques()
    Dim Na As Long, Nc As Long, Ne As Long
    Dim i As Long
    Na = Cells(Rows.Count, "A").End(xlUp).Row
    Nc = Cells(Rows.Count, "C").End(xlUp).Row
    Ne = 1

    For i = 1 To Na
        Cells(Ne, "E").Value = Cells(i, "A").Value
        Ne = Ne + 1
    Next i
    For i = 1 To Na
        Cells(Ne, "E").Value = Cells(i, "C").Value
        Ne = Ne + 1
    Next i

    Range("E:E").RemoveDuplicates Columns:=1, Header:=xlNo
End Sub

will produce this type of result:

enter image description here

Gary's Student
  • 95,722
  • 10
  • 59
  • 99