Results 1 to 2 of 2

Thread: list all items

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    list all items

    Hi,

    I want a marco that can list all items in a range.
    However, I don't want repeated items.

    Please refer to the picture below.

    Column H
    is the result that I want.
    However, my code can produce the result like column G only.

    The items are in range(C5:E7).

    Could you please amend my code so that I can produce the result like column H?

    Thanks

    [VBA]
    Sub ShowAllItems1()

    ActiveCell.CurrentRegion.Select

    Set a = Selection

    i = 1
    For Each x In a
    x.Copy
    Cells(4 + i, 7).PasteSpecial
    i = i + 1
    Next

    End Sub
    [/VBA]
    Attached Images Attached Images
    • File Type: jpg X.jpg (46.7 KB, 12 views)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •