+ Reply to Thread
Results 1 to 6 of 6

How to have a Macro run based on a value in a cell

  1. #1
    Registered User
    Join Date
    12-23-2011
    Location
    pomona, ca
    MS-Off Ver
    Excel 2010
    Posts
    36

    How to have a Macro run based on a value in a cell

    Hi All,

    I am wondering how to have a macro run based on a value in a cell.

    Objective:

    To have a row automatically cut from one sheet and pasted into another (existing) sheet based on a value of "closed" in the row in question without having to click a button that calls a macro.

    Extra:

    I have written Macros that can cut and paste rows from one sheet to another based on a value, but I always have to create a button and have it call the macro. I am not asking y'all to write the macro, as I would like to take another stab at that. I am just wondering if it is possible to have a macro run on its own when a value of "closed" is chosen from a list in a cell.

    Attached:

    I have attached the workbook that I am trying to make this happen for so as you can have a better idea of what I am dealing with.

    Thanks in advance!

    Tom L.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: How to have a Macro run based on a value in a cell

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-23-2011
    Location
    pomona, ca
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: How to have a Macro run based on a value in a cell

    Do I put this is as a private sub? or does it matter?

  4. #4
    Registered User
    Join Date
    12-23-2011
    Location
    pomona, ca
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: How to have a Macro run based on a value in a cell

    This is what I have so far, but it doesn't seem to be working...

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: How to have a Macro run based on a value in a cell

    It would need to be in a sub yes, and you would need to specif what Y is?

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How to have a Macro run based on a value in a cell

    Please Login or Register  to view this content.
    use ThisRow as Row that changed to closed

+ 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