+ Reply to Thread
Results 1 to 9 of 9

VBA Macro to format credits and debits.

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    VBA Macro to format credits and debits.

    I wanted to thank you all in advance for your assistance with my project. I’m afraid that I am not very good with formatting so you might find my example odd as the layout is exactly how it appears in my “real” application making it much easier for me to apply once a solution is created.

    I need a VBA Macro that will separate the buys and sells on Sheet1 (we don’t know how long this list will be) and place them nicely on the print out page including the summary info that you see (total # of transactions and total). You will see that the Debits side data is dropped in Col G, H, and K which is UNLIKE the Credits but that is because on the page above it (note this starts on like 53) there is more formatting so it needs to be dropped like that.

    There SHOULD never be any more than 29 of either Credits or Debits so we don’t need to worry about going over.

    Thank you again.
    Attached Files Attached Files

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: VBA Macro to format credits and debits.

    Seems like you should use a pivot table. Any reason you wouldn't?
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA Macro to format credits and debits.

    Yes, I agree PT is much more easier to maintain. I have included a code, but I am not sure if you could tweak it yourself should the layout changes.
    Attached Files Attached Files

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro to format credits and debits.

    Hi sungen99

    This Code in the attached should be fairly easy to maintain...CTRL + x will fire the Code.

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

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: VBA Macro to format credits and debits.

    Guys your all amazing! Thank you so much for this.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro to format credits and debits.

    You're welcome...glad I could help. Thanks for the Rep.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro to format credits and debits.

    Hi Ken

    Per your PM this Code is modified for this...you'll need to test it...
    I have run into a scenario that I did not foresee, the possibility of not having any credits / debits at all. Obviously the program will error if that occurs- would you be able to add some form of error handling that simply skip and show 0 transactions in the summary?
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: VBA Macro to format credits and debits.

    YEP! Thank you!

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro to format credits and debits.

    Hi Ken

    Received your PM
    2016-10-04_12-46-55.jpg


    I thought we dealt with this in Post #7. Is it not working? If not, please upload the offending File WITH Code you're currently using.

+ 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. Matching Debits and Credits
    By Hiruy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-08-2015, 07:06 AM
  2. Debits and credits
    By Willow350 in forum Excel General
    Replies: 2
    Last Post: 12-07-2014, 11:34 AM
  3. How to delete Debits & credits off with a macro
    By gavinsmommie24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2014, 11:42 PM
  4. [SOLVED] Lookup Debits & Credits
    By Sniper in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2012, 10:25 AM
  5. Creating Macro to Hide offsetting debits and credits
    By lcarmack in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2012, 05:07 PM
  6. Highlighting Debits and Credits
    By vharjani in forum Excel General
    Replies: 15
    Last Post: 02-23-2012, 02:20 PM
  7. [SOLVED] Change debits to credits
    By Yo in forum Excel General
    Replies: 1
    Last Post: 04-10-2006, 08:20 PM

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