+ Reply to Thread
Results 1 to 5 of 5

Recorded macro doesn't seem to provide expected result

  1. #1
    Registered User
    Join Date
    09-21-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    71

    Recorded macro doesn't seem to provide expected result

    Hi you all,

    Normally I keep trying until I find what's wrong but this time I could use some help.

    On column A, I simply do an A-Z sort that gives the expected result. So I recorded it as a macro.
    In column G is a code that corresponds with column A. When the marcro is executed Column A is sorted but the corresponding value in G stays where it is.
    Clicking the A-Z button works. But when that action is recorded as a macro I get the above quirck.

    Since VBA is not my beef, I don't really know what wrong...

    cheers,


    edit; Doh, Monday morning; This should go into the excel section.

    [MOD EDIT - moved]

    Jeroen
    Last edited by Jeroen1000; 09-21-2009 at 08:03 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    19,339

    Re: Recorded macro doesn't seem to provide expected result

    Can you post the code that is not working. Don't forget to use code tags.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-21-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    71

    Re: Recorded macro doesn't seem to provide expected result

    hi Andy,

    I think I got it. There was a formula on a column that changed my expected result. A bit stupid I didn't notice really.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: Recorded macro doesn't seem to provide expected result

    Recorded macros generally need tidying up, but if you are satisfied with your solution please mar this thread solved.


    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    09-21-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    71

    Re: Recorded macro doesn't seem to provide expected result

    I usually do my best cleaning them. I am curious how one would grade my code;

    Please Login or Register  to view this content.

+ 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