Summing to blank row + 1 help

  • Hi all,


    I've been browsing these forums for a while -- it is such a wonderful resource. I was able to find some VBA codes that will allow me to add an extra row whenever the word "Transfer" appears and to sum the values below the blank row that was added. I need to adjust this range to include one extra cell after the blank row but can't seem to figure it out. Is it possible to look for the blank row + 1? Also, is it possible to combine this action into one macro, rather than having to run multiple macros to get the result I'm looking for? I've attached a copy of the test document I'm using.


    Thanks! I appreciate your insight!


  • Re: Summing to blank row + 1 help


    Give this a try; it combines both in one:



    WBD

    Excel 2016 on Windows 10.
    Please use [code] tags when posting code.


    Marvin: I've been communicating with the ship.
    Ford: What did it say?
    Marvin: It hates me.

  • Re: Summing to blank row + 1 help


    Quote from rcb1;774705

    That is beautiful wideboydixon -- thank you!


    You're welcome :)


    WBD

    Excel 2016 on Windows 10.
    Please use [code] tags when posting code.


    Marvin: I've been communicating with the ship.
    Ford: What did it say?
    Marvin: It hates me.

  • Re: Summing to blank row + 1 help


    Hi wideboydixon, I hope you don't mind me asking one last question, but I was wondering if you might know how to perform two additional tasks on this document:


    1. Add "Balance" to the cell above each instance of "transfer" -- e.g. B5, B14, B19, B24, B30 would contain "Balance"
    2. If possible, would it also be possible to add a row below the header and add "Balance" and the same sum pattern as the others? (this often doesn't follow the same "transfer" pattern, so it may require an additional line of code)


    If this is too much, it is totally understood; however, any insight would be greatly appreciated!

  • Re: Summing to blank row


    Apologies, I just realized that I had posted this in the wrong section. If someone can move this to Excel VBA / Macros it'd be appreciated.


    Aside from this, to help clearly display my problem I've attached another document that includes tabs for the base data ("test"), the post-macro data ("current"), the macro code used ("macro") and the desired outcome ("desired outcome").



    Thanks all, for your help and insight on this!

  • Re: Summing to blank row + 1 help


    Scratch that, I was able to figure it out. Thanks everyone.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!