Results 1 to 19 of 19

Recoding macro to add all cells above a target cell until there is a blank row.

Threaded View

  1. #1
    Registered User
    Join Date
    09-01-2013
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    29

    Recoding macro to add all cells above a target cell until there is a blank row.

    Hi I have a worksheet with a process I am trying to automate to save time. So far I am able to record simple macros to get most of the job done but I cannot work out how to make a macro for the second step. I first click on a cell that has information in it and have made a shortcut to insert a blank row. The second step (the step i need an answer for) needs to sum all the cells above it until it comes to a blank row and provide the total in a cell three cells to the right of the targeted cell.

    I have tried recording one using relative referencing but as the number of cells above the target varies each time i use the macro it returns an incorrect result. Please see the attached worksheet for an example of the data.

    In the example i have already added rows at 63 and 72 to give an idea of the difference there can be in the amount of rows above the targeted cell and i need a macro that will total the cells in the column above B63 and provide the answer in the cell E63.

    Then i need to be able to use the same macro to start at B72 and for it to total all the numbers in the column above it until it reaches the blank row and provide the answer in cell E72

    I am only new to using macros so if someone could suggest how to do this with the record function that would be great.

    Thanks in advance
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to have a cell return blank when the target cell it is copying is blank
    By DanielWinning in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-23-2013, 11:14 AM
  2. Replies: 5
    Last Post: 08-20-2013, 08:10 AM
  3. Replies: 5
    Last Post: 01-22-2013, 11:38 AM
  4. Time Recoding macro
    By ag07 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 01:11 PM
  5. Copy data but leave target cell blank
    By MarcoAUA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2012, 02:27 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