Forum Discussion

madelyn cole's avatar
madelyn cole
Copper Contributor
May 26, 2018

Excel Macro won't sort date colum

I'm trying to create a macro to sort and clean up data I import into excel that includes dates, amounts, and text fields.  When I record the macro, I sort the date column from oldest to newest, but when I play the macro back, I get an error message.  I think what's happening is that the macro didn't record or can't play back the steps to sort the date column.  Is there a way to record macros that sort date columns?  Any help would be greatly appreciated.

  • Logaraj Sekar's avatar
    Logaraj Sekar
    Steel Contributor

    Hi,

     

    In which column date is and specify the range or put screenshot of data or paste that macro / error.

    • madelyn cole's avatar
      madelyn cole
      Copper Contributor

      Thank you for your response.  The date is in column A.  I've attached screen shots of the error message and the dbug information.  Hope this helps. 

      • Logaraj Sekar's avatar
        Logaraj Sekar
        Steel Contributor

        Hi madelyn cole

         

        Make sure that sheet name specified in code "bk_download" matches with the sheet name you are running. May be sheet name changed or contains extra spaces.

Resources