+ Reply to Thread
Results 1 to 2 of 2

Subtract from last cell modified by macro?

  1. #1
    Registered User
    Join Date
    02-03-2014
    Location
    Phoenix
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Subtract from last cell modified by macro?

    I'm building a work effort tracker for employees to record what they do throughout the day and submit it via email, and I've got everything but the "Undo" button working. Right now I have 13 buttons that add +1 to cells C9:C21, and a submit button that copies those cells into an email. What I'm trying to find a solution for is if someone clicks the wrong button, say clicks Inbound Call instead of Outbound Call, which would +1 to C9 instead of C10.

    I've read that coding an undo macro button is pretty much impossible, but is there a way to locate the last cell modified by a macro and subtract 1 from it? Or possibly identify the cell contained in the last macro run and -1 from it that way? I'm not terribly experienced with macros, and most of what I've put together I've actually found on this forum, so any help is appreciated.

    Thank you,
    Roshman

  2. #2
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Subtract from last cell modified by macro?

    I think you may need to write a short bit of code to input a variable value or string to a designated cell to tell what has been run. Then use this to reverse what was run.
    EG.
    Inbound Call: Add
    Please Login or Register  to view this content.
    to the start.

    Add 2 other codes (Reverse_Inbound & Reverse_Outbound)to do the reverse of the selected macro.

    Add an UNDO Button to :
    Please Login or Register  to view this content.
    Then it begs the Q.
    Do you need a reverse option for the reverse code etc....

+ 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. Button Macro to Subtract values from another cell
    By mdoverl in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-15-2014, 06:42 PM
  2. Replies: 10
    Last Post: 06-20-2013, 01:47 AM
  3. Replies: 0
    Last Post: 01-29-2013, 04:59 PM
  4. Macro to run whenever any cell in the spreadsheet is modified
    By theoldebrewer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-21-2012, 03:21 PM
  5. Subtract two cell on Excel Macro
    By antoni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2009, 03:10 AM

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