Please Login or Register to view this content.
Please Login or Register to view this content.
Maybe the below will help, you will need to adjust to your range of your data.Please Login or Register to view this content.
Thank you for your answer!
I'm not expert on VBA but my rows contain a variable non empty cells! I mean on the first row last column is D but on the second it's "AC".
Can you please help me on that.
Thanks
Hi, the code is set up to work on any number of columns. However, I had to make assumptions about where the data was located. Perhaps if the code doesn't work, you could upload an example workbook to show what your data looks like and I can alter the code as neccessary. To upload a workbook, click go advanced, and then attachments.
Ooooh It's working with my data! Thank you ragulduy
Can you explain me the code when you have time please
This bit
loops through each row, and if there is something in column C, inserts a row, copies down the value of column a and then moves the columns from C to the end of the row to the next row, starting at column B.Please Login or Register to view this content.
this:
ActiveSheet.Cells.Sort key1:=Range("A1"), key2:=Range("B1")
sorts the new data set by column a and then by column b, so that the items are in aphabetical order and the duplicates are next to each other
This bit:
loops through each row and if it is a duplicate deletes it, it also checks if the column A entry is not the first one of that item and deletes it if it isn'tPlease Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks