+ Reply to Thread
Results 1 to 6 of 6

{SOLVED} Macro for reset

  1. #1
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2003
    Posts
    107

    {SOLVED} Macro for reset

    I am looking for help creating a macro for a very basic formula

    Below are A, B, C, D columns where C1 (New Total) = D1 + A1 + B1

    I want to record a macro (Ctrl + Shft + letter) to make D1 equal to C1 and resetting the value of A1 & B1 back to zer

    New 1 New 2 New Total Current Total
    120 -50 5070 5000
    Last edited by clundeen; 03-27-2011 at 04:18 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Macro for reset

    Please Login or Register  to view this content.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Macro for reset

    Try this macro

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007. Hit the options button to specify your choice of shortcut key.
    Martin

  4. #4
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Macro for reset

    Thanks MRICE.....works well. How do I integrate and range of rows? say rows 1-10

    Sub Test()
    Range("$D$1").Value = Range("$C$1").Value
    Range("$A$1").Value = 0
    Range("$B$1").Value = 0
    End Sub

  5. #5
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Macro for reset

    I got it....

  6. #6
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: {SOLVED} Macro for reset

    Well done.

    This is what I would have suggested.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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