+ Reply to Thread
Results 1 to 9 of 9

Trying to Clean Up / Simplify Macro While keeping functionality

  1. #1
    Registered User
    Join Date
    08-31-2023
    Location
    Omaha, NE
    MS-Off Ver
    MS365 MSO (Version 2501)
    Posts
    10

    Question Trying to Clean Up / Simplify Macro While keeping functionality

    Hi There,

    So I created this macro and it works flawlessly, however its pretty lengthy. I was wondering if there is anyone that could possibly help me clean this up or simplify it so its not as long while also making sure it keeps its functionality and works like a charm. The role of this macro is to use "raw" data on an exported spreadsheet and determine which tab the lines need to be moved to and then create pivot tables on two of the tabs, using pivot tables then perform text to columns and eventually move to a new sheet where an journal entry is created to be uploaded to move those items from one GL account to another.

    I haven't been able to add the reclass portion yet, but if you would to take a stab at it, all items in the "ClientReclassSummary" pivot table need to be reclassed to acct 61000101 using the opposite posting "key" of what is listed on "summary" for those lines.. so if its 40 on lines in "key" it needs to be 50 for 61000101 on the entry tab and vice versa. the reclass lines also need to be below the originally pasted "client reclass" lines on entry tab keeping all information on those line except changing the acct # and posting key to be opposite of original but making sure not to override the pasted data from "Non-Client Reclass" pivot. Any help with this would be greatly appreciated. If you also need any more info from me to help let me know .

    Thanks!

    Sub TravelExpenseAnalysis().txt
    Last edited by AliGW; 03-27-2025 at 10:31 AM. Reason: Irrelevant section of thread title removed.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,518

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    Administrative Note:

    Post the code in the thread wrapped in code tags, please.

    Is your forum profile up-to-date and showing ONLY the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The four most recent Excel products are Excel 2019, Excel 2021, Excel 2024 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-31-2023
    Location
    Omaha, NE
    MS-Off Ver
    MS365 MSO (Version 2501)
    Posts
    10

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    So i cant really reply with the coding in the thread as its 23.3k characters.. i guess i can split it up. if that helps?

    Steps 1-10:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-31-2023
    Location
    Omaha, NE
    MS-Off Ver
    MS365 MSO (Version 2501)
    Posts
    10

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    well i cant post 11-14 as it says im posting links but i cant..

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,518

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    Remove the URLs from the code.

  6. #6
    Registered User
    Join Date
    08-31-2023
    Location
    Omaha, NE
    MS-Off Ver
    MS365 MSO (Version 2501)
    Posts
    10

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    literally is no URLS tho? its all coding..

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,518

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    OK - leave it as a TXT file, then.

    Might be useful to attach the workbook, too.

  8. #8
    Registered User
    Join Date
    08-31-2023
    Location
    Omaha, NE
    MS-Off Ver
    MS365 MSO (Version 2501)
    Posts
    10

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    okay thank you. I wish i could add workbook but I'm not able to do as it has sensitive information for my company on it.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,518

    Re: Trying to Clean Up / Simplify Macro While keeping functionality

    Can you not make a copy and desensitise it?

+ 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. [SOLVED] Coding Convention Questions #2 (To clean up or not to clean up)
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 03-31-2014, 08:18 PM
  2. Ctrl F Functionality in Macro
    By carlosriver24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2013, 01:13 PM
  3. [SOLVED] Improve functionality of a Macro
    By Floydlevedale in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2012, 06:02 AM
  4. [SOLVED] VBA Code to optimize and clean data- clean out numerical/ or symbol
    By tracylsr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-05-2012, 04:21 PM
  5. Question on Macro functionality
    By fatboylard in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2012, 06:14 AM
  6. Simplify or clean a macro that sets the interior color of a non-contiguous range
    By TrafficGuy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 06:40 PM
  7. Clean Function to Clean Entire Sheet
    By gema in forum Excel General
    Replies: 7
    Last Post: 11-05-2009, 10:07 AM
  8. macro functionality - i think?
    By 12BM34 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2008, 09:27 AM

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