+ Reply to Thread
Results 1 to 7 of 7

Macro edit to make it more robust (accounting for annomalies)

  1. #1
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Macro edit to make it more robust (accounting for annomalies)

    Hello all , many thanks for taking the time to look at my problem.

    I have a fully functional macro but I need some help making it more robust for my needs. The problem i have is very hard to explain in here but it should be easy enough to understand in the attached example.

    Many thanks for taking the time to look at this problem,

    Alan UpdateMod.xlsm

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro edit to make it more robust (accounting for annomalies)

    hi Alan, Merry Christmas and Happy New Year. Please check this code, the new line is underlined:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Macro edit to make it more robust (accounting for annomalies)

    Ahhh many thanks Watersev, the updated macro works perfectly for "update data"! However the update list is in need of some adjustment.

    Currently running the update list macro puts two names at the end of the list in Column A, that should not be there because they already exist, all be it with a different parenthesis. What i need it to do is check column A for an exact match, if exact match is found - do nothing, if not check the same name without parenthesis in column B (again looking for exact match.) If exact match is found, it does nothing. However if it is not found in either column A or column B, we need it to input the name with Parenthesis at the bottom of column A list, and without parenthesis at the bottom of column B list.

    I know this sounds messy, but i am afraid it is a problem with the data source.

    Hope you can help,

    Alan

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro edit to make it more robust (accounting for annomalies)

    hi Alan,

    Please Login or Register  to view this content.
    Last edited by watersev; 01-11-2012 at 01:32 AM.

  5. #5
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Macro edit to make it more robust (accounting for annomalies)

    Hi watersev, unfortunately this macro doesn't work in its current format. Upon running it, it appears to not to search column B for the "Name" minus parenthesis. For instance Andrea and Leon already appear in the list (row5&6.) I was hoping it would search column B for the Name without parenthesis, if found - do nothing. Only for names not found in the "parenthesis column" (Column A) and the "non parenthesis column" (Column B), would it input the names at the bottom of both these columns.

    There was a small error in that it was overwriting the bottom row of the data array also. But this was something i knew how to edit.

    Please Login or Register  to view this content.
    I hope you are able to help me further with this problem.

    Many thanks

    Alan

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro edit to make it more robust (accounting for annomalies)

    give me 10-15 minutes, the code is wrong
    Last edited by watersev; 01-12-2012 at 11:05 AM.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro edit to make it more robust (accounting for annomalies)

    Quote Originally Posted by ad9051 View Post
    Only for names not found in the "parenthesis column" (Column A) and the "non parenthesis column" (Column B), would it input the names at the bottom of both these columns
    If value is not found in both columns we add values:

    Please Login or Register  to view this content.
    Last edited by watersev; 01-12-2012 at 11:50 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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