+ Reply to Thread
Results 1 to 12 of 12

Formula not triggering Routine

  1. #1
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Formula not triggering Routine

    Hello
    I found what I thought to be the most simple code for my use and it works a treat other than when the number in column two reaches a zero by way of a formula, the date called for does not appear in column 5 even though the cell is empty. When I enter a zero in column 2 manually, all is good. I have read that the formula change does not trigger the code and perhaps using calculate instead of change but without success.
    Any ideas or solutions would be very much appreciated

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Formula not triggering Routine

    .
    This works here :

    Please Login or Register  to view this content.
    There were two PERIODS between TARGET & VALUE.

  3. #3
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Formula not triggering Routine

    Thanks for the prompt reply and sharp eye. I tried again but without success. I put the following formula in column B and the edit the adjacent cell in column A
    Again, no luck

    =IF(A6=1,0,"")

    It will work if the zero is entered manually.
    Thanks again

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula not triggering Routine

    The change event triggers in response to entries in cells (manual or via VBA), not formulas.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Formula not triggering Routine

    You should refer the change event to column A since this is the cell you manually change.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  6. #6
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Formula not triggering Routine

    Thanks. In this simple example that would be good but in the sheet I am using it in, the zero is generated from a range where varying amounts of cells could be changed for each row for instance, when the zero is met i.e. all required cells are complete.

  7. #7
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Formula not triggering Routine

    I have updated the code for the attached workbook. As you can see, adding anything in the table to complete the row has no effect but entering a Zero in column J manually when J is empty has the desired effect.
    Thanks

  8. #8
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Formula not triggering Routine

    Not sure what's happening but I don't seem able to attach the workbook.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula not triggering Routine

    Click Reply to Thread. Below the Quick Reply window, click Go Advanced, then scroll down below the Your Message window to Additional Options and click Manage Attachments.

    That opens the Manage Attachments window; click Browse, navigate to the file, click Upload, then click Close this Window at top right.

    That returns you to the Your Message window; click Submit Reply.

  10. #10
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Formula not triggering Routine

    Hopefully attached this time???
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Formula not triggering Routine

    Thanks SHG

  12. #12
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Formula not triggering Routine

    Try this.
    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)

Similar Threads

  1. [SOLVED] Excel 2016 Sort routine issue - recording macro has sheet name in sort routine
    By pongmeister in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-05-2016, 02:45 PM
  2. [SOLVED] naming a routine and calling it in another routine - not a loop
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2015, 11:54 AM
  3. [SOLVED] How to get an AVERAGEIFS formula to not include cell in average, by triggering switch?
    By Carmstrong227 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2013, 01:15 PM
  4. Pass a variable from one sub-routine to another sub-routine
    By gowtham_pec in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-01-2013, 07:07 PM
  5. Volatile formula not triggering Workbook_SheetCalculate()
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2012, 10:57 AM
  6. Worksheet Change Event not triggering with cells containing formula
    By Skell in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-15-2012, 06:16 PM
  7. [SOLVED] Drop-down list triggering the wrong routine
    By Broadband Al in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2005, 06:10 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