+ Reply to Thread
Results 1 to 9 of 9

Delete duplicates in row leaving value on right hand side

  1. #1
    Registered User
    Join Date
    08-08-2011
    Location
    Warwick
    MS-Off Ver
    Excel 2003
    Posts
    48

    Delete duplicates in row leaving value on right hand side

    Hi all,
    I've got a data set where i need to remove duplicates from each row. I cannot use the remove duplicates feature as the data has an outline so I was hoping to be able to use VBA... The range will always be P(row number):AW(row number) and I always want to leave the 'latest' number - i.e, in the attached screenshot, i'd want to leave the values in columns R and T - ergo, the values in columns Q and S should be removed.

    First question, I guess, is "can this be done in VBA" and then "how do I go about it"?

    Capture.PNG

    Thanks as always!
    Jon

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Delete duplicates in row leaving value on right hand side

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    08-08-2011
    Location
    Warwick
    MS-Off Ver
    Excel 2003
    Posts
    48

    Re: Delete duplicates in row leaving value on right hand side

    My apologies, team - attachment now uploaded.
    Attached Files Attached Files

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Delete duplicates in row leaving value on right hand side

    Will it just be those values in the row?

  5. #5
    Registered User
    Join Date
    08-08-2011
    Location
    Warwick
    MS-Off Ver
    Excel 2003
    Posts
    48

    Re: Delete duplicates in row leaving value on right hand side

    Yep - there are likely to be a number of duplicates (currently no more than 15) all adjacent to eachother.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Delete duplicates in row leaving value on right hand side


    Hi !

    Amounts belong only by pair or it can have more than 2 values within a row ?

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Delete duplicates in row leaving value on right hand side

    This will find the last cell in the row and delete everything before that, in your sample it would start from column M, in your image supplied it would start from column P

    Change it to suite your requirements.

    Please Login or Register  to view this content.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,195

    Re: Delete duplicates in row leaving value on right hand side

    Perhaps...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 05-02-2019 at 01:42 PM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  9. #9
    Registered User
    Join Date
    08-08-2011
    Location
    Warwick
    MS-Off Ver
    Excel 2003
    Posts
    48

    Re: Delete duplicates in row leaving value on right hand side

    Thanks everyone - all responses have helped me greatly!

    Cheers,
    Jon

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to remove 8 character from right hand side
    By BRIJESHHEGDE in forum Excel General
    Replies: 2
    Last Post: 01-19-2017, 08:13 AM
  2. Replies: 7
    Last Post: 12-02-2013, 05:37 PM
  3. Excel Table Delete Duplicates Leaving Most Recent Entry
    By BuntyMac in forum Excel General
    Replies: 0
    Last Post: 03-02-2011, 11:10 AM
  4. Replies: 1
    Last Post: 06-19-2006, 04:37 AM
  5. [SOLVED] y-axis moves from the left hand side to the right hand side
    By JP in forum Excel General
    Replies: 1
    Last Post: 03-13-2005, 01:06 PM
  6. y-axis moves from the left hand side to the right hand side!
    By JP in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-10-2005, 09:06 PM
  7. How do I get my y axis on the left hand side of my chart?
    By Aneleh in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-08-2005, 02:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1