+ Reply to Thread
Results 1 to 7 of 7

Current Time Capture When Formula Result Turns to 0

  1. #1
    Registered User
    Join Date
    05-25-2012
    Location
    Chennai,TamilNadu,India
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    61

    Current Time Capture When Formula Result Turns to 0

    Hi,

    I have written a vlookup formula in B column when Vlookup returns 0 I need a current time to get captured in C column. Once the time is captured, it should not change.
    Problem i am facing is, when other vlookup formula results to 0, earlier time also gets refreshed.
    Appreciate help in this regard...

  2. #2
    Forum Contributor
    Join Date
    10-28-2015
    Location
    Lincolnshire, England
    MS-Off Ver
    2016
    Posts
    188

    Re: Current Time Capture When Formula Result Turns to 0

    Through a formula, this isn't possible using the NOW() or TODAY() functions as they will constantly update when the workbook re-calculates.

    Have you considered using the Ctrl+: and Ctrl+; options to manually insert a date/time?

    Thanks
    If myself or others have helped, please add to our reputation by pressing the 'Star' icon below this.

  3. #3
    Registered User
    Join Date
    05-25-2012
    Location
    Chennai,TamilNadu,India
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    61

    Re: Current Time Capture When Formula Result Turns to 0

    Hi,

    I want the time to get captured automatically whenever the formula result goes to 0

  4. #4
    Forum Contributor
    Join Date
    10-28-2015
    Location
    Lincolnshire, England
    MS-Off Ver
    2016
    Posts
    188

    Re: Current Time Capture When Formula Result Turns to 0

    You will have to do this through VBA.

    I'm sure someone will come along and will be able to assist you further in writing VBA code to check if the cell = 0 and then to date/time stamp the cell next to it.

    Thanks

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Current Time Capture When Formula Result Turns to 0

    I don't know that it "requires" VBA, though some might find it easier to do. I expect that some variation of this formula method of inserting time stamps should work for "timestamping" when a VLOOKUP() returns 0: http://chandoo.org/wp/2009/01/08/tim...-formula-help/
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    05-25-2012
    Location
    Chennai,TamilNadu,India
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    61

    Re: Current Time Capture When Formula Result Turns to 0

    Appreciate the help..I am trying to get a solution which can work for any volume data. My data volume easily crosses 95000 rows every day easily, in my opinion circular reference would not be optimum solution.
    I tried macro code for it using worksheet change event, it gets the time stamp only when the value 0 is manually entered. It is not getting the time stamp when the formula calculates..is there any perfect solution this scenario.
    I am trying to use the worksheet calculate event, not sure what code can make it to work..

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Current Time Capture When Formula Result Turns to 0

    I am not sure why 95000 rows should be a concern. If you are concerned that this kind of circular reference (that should only need one iteration per calculate event) will be "slow" to calculate, I have a hard time believing that this would be significantly slower than a VBA solution, and could easily be faster (since it avoids the overhead that seems unavoidable every time VBA and the spreadsheet need to interact). If that is your concern, I would point you to this situation (https://www.excelforum.com/excel-pro...-possible.html ) where the OP compared my simple circular reference to some VBA that he commissioned and he/she indicated that the simple circular reference was faster than his/her VBA solution.

    In any case, it is up to you to decide how you want to approach it. If you want to pursue the calculate event procedure, it might help to be clear on exactly what trouble you are having. Is it failing to call the procedure? What statements have you tried? As with a lot of this kind of programming, probably the first thing I would do would be to add a stop statement to the top of the procedure so that it will enter debug mode as soon as the procedure is called. That would tell me if the procedure is being called correctly or not, and allow me to investigate the variables and statements to see where it is going wrong.

+ 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] Capture real time data/DDE capture
    By rajre in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-07-2022, 05:14 AM
  2. VBA to replace formula with it's result after current day passes.
    By Chypp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-24-2017, 04:40 AM
  3. [SOLVED] Formula to capture taken taken in hours between two dates and time
    By ed.mcardle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-25-2015, 04:36 PM
  4. [SOLVED] Use which Formula to capture the 'result=Disable' in two seperate sheet?
    By DonnyLau in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-12-2013, 01:02 AM
  5. Replies: 2
    Last Post: 12-06-2011, 04:21 PM
  6. [SOLVED] WHAT FUNCTION 2 ENTER SO THE CELL TURNS RED AFTER CURRENT DATE
    By awilliams in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-01-2006, 04:45 PM
  7. Replies: 3
    Last Post: 03-06-2005, 12:00 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