Inserting Names from range

  • I have a spreadsheet with transactions by customers. I want make a list of them in another section of the spreadsheet without duplicating their names.
    I have the following code:



    The problem I have having is moving the destination line down one line. How do I do that with this. I am using the j variable to represent the destination cell.


    Thanks

  • Hi


    try the code



    hope it helps


    jindon

  • sorry, I gave wrong information


    JLindon,


    Sorry, I didn't want to delete the rows. This is what I want to do


    in 1 range I have names:


    source: Destination
    Joe Joe
    Joe Mick
    Mick Mike
    Mick Johnny
    Mike John
    Johnny
    Johnny
    John


    what I did with the code i sent was to modify it slightly. I wanted to replace the delete rows with the list in the destination column. What I couldn't figure out was how to make the code go from Joe to Mick, Mick to Mike, Mike to Johnny and Johnny to John.


    Can the code that I originally sent be modified to do this or would something else be needed.


    Thanks for your help.

  • Hi,


    then try



    hope it helps


    jindon

  • Thanks JLindon, works like a charm


    Could you explain the elements within the With section? If some of these lines are excluded, will it run properly?

  • Hi,


    I thnik you can change, but cannot exclude any of line within With section.
    Following is the brief explanation.


    compare with for-next



    hope it helps
    jindon

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!