+ Reply to Thread
Results 1 to 9 of 9

Use VBA Remove Duplicates without removing cell formatting

  1. #1
    Registered User
    Join Date
    12-17-2014
    Location
    london
    MS-Off Ver
    2010
    Posts
    4

    Angry Use VBA Remove Duplicates without removing cell formatting

    Hey,

    I have a some code which will output a table depending on the users choices in an initial menu. I then use:

    Please Login or Register  to view this content.
    to remove any duplicates in the final table but it is also removing the formatting of the cells which means when the program is run again - if the new results table is longer than the last, the last few rows don't match the formatting that was set in the sheet.

    Please help.

    Thanks
    Last edited by Leith Ross; 12-17-2014 at 01:19 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Use VBA Remove Duplicates without removing cell formatting

    Hello Harriet.Jones,

    Welcome to the Forum!

    To help you with this problem, you should post your workbook. We need to see how the data is arranged, what formulas you are using, etc. Otherwise, we are wasting time by guessing.

    Please provide before and after examples of your data along with any notes you would like to include.

    If your workbook contains any sensitive information, please redact that information before you post.


    Posting your workbook will allow solutions to be tested before posting back the answer.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-17-2014
    Location
    london
    MS-Off Ver
    2010
    Posts
    4

    Re: Use VBA Remove Duplicates without removing cell formatting

    Thanks Leith Ross , Do you need the entire doc or just a copy of the problem page - before and after?

    Thanks.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Use VBA Remove Duplicates without removing cell formatting

    Hello Harriet.Jones,

    You say entire "doc". Is this a Word document or an Excel workbook?

    Either way, you should post the entire document. Be sure to include and "after" page as well then we know how the final for should look.

  5. #5
    Registered User
    Join Date
    12-17-2014
    Location
    london
    MS-Off Ver
    2010
    Posts
    4

    Re: Use VBA Remove Duplicates without removing cell formatting

    Tool_HJ.xlsm

    I just want the formatting on the results page to remain up until the 108th line.

    If this isnt a simple addition to the .RemoveDuplicates line then I will have to recreate the formatting within the code each time. I just want to know if the first option is possible.

    Thanks.

  6. #6
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Use VBA Remove Duplicates without removing cell formatting

    The email to manager bit at the bottom did you need the code for that too ?

  7. #7
    Registered User
    Join Date
    12-17-2014
    Location
    london
    MS-Off Ver
    2010
    Posts
    4

    Re: Use VBA Remove Duplicates without removing cell formatting

    @donkey_uk Did you mean to add that to the thread? Which bit do you mean?

  8. #8
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Use VBA Remove Duplicates without removing cell formatting

    Sorry wrong post

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Use VBA Remove Duplicates without removing cell formatting

    Hello Harriet.Jones,

    The macro below has been added to the attached workbook. Now the workbook opens with the list boxes filled in.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Remove duplicates without removing formatting?
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-28-2014, 06:48 PM
  2. [SOLVED] Removing Unused Lines After Remove Duplicates
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2013, 07:30 PM
  3. [SOLVED] Removing Unused Lines After Remove Duplicates
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-16-2013, 04:51 PM
  4. [SOLVED] Remove Duplicates issue...Not Removing as it should
    By trosasco in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-24-2013, 12:57 PM
  5. Remove Duplicates not removing all duplicate entries
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2008, 05:32 PM

Tags for this Thread

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