+ Reply to Thread
Results 1 to 4 of 4

return a snapshot of a cell value at a designated time

  1. #1
    Registered User
    Join Date
    07-19-2009
    Location
    Bangkok Thailand
    MS-Off Ver
    Excel 2003
    Posts
    9

    return a snapshot of a cell value at a designated time

    I am rusty but what I want to do is return a snapshot of a cell value at a designated time (it will be saved in an array) so it either returns the cell value at the designated time else 0.

    In words: if time now is 9.50.00 am return value in cell A1 else 0

    thought I had it with =IF(TIME(9,50,00),A1,0) which just returns 00:00:00 regardless of time designated or not

    I have also tried referencing the cell containing =NOW()

    I am not sure if TIME is actually the function I need - tried various ways of incorporating =NOW() but it either is not able to be incorporated into a formula or I am nesting it incorrectly.

    As I said I am rusty - if someone knows how to do this please post - if you know it it can't be done e.g. functions are not right for this, or you know there is no way Excel can do this, please post.

    If you need further clarifications please let me know. Basically. what I want to do is compare the value as it updates in real-time with what it was at a certain time (by referencing the cell reference in an array)

    What I want to do is compare the value as it updates in real-time with what it was at a certain time (by referencing the cell reference in an array)

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: return a snapshot of a cell value at a designated time

    The only way I could see this being done is to have a VBA sheet change event storing the times and values and a UDF to return a specific time related value.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: return a snapshot of a cell value at a designated time

    if ur given time is equal to current time then it will show in A1 cell else 0

    then use this formula :
    =IF(TEXT(TIME(15,48,0),"hh:mm")=TEXT(NOW(),"hh:mm"),NOW(),0)

    if u want sec. also then
    =IF(TEXT(TIME(15,48,0),"hh:mm:ss")=TEXT(NOW(),"hh:mm:ss"),NOW(),0)


    also that A1 cell number formatting will be Time formatting

  4. #4
    Registered User
    Join Date
    07-19-2009
    Location
    Bangkok Thailand
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: return a snapshot of a cell value at a designated time

    Quote Originally Posted by pwnyadav007 View Post
    if ur given time is equal to current time then it will show in A1 cell else 0

    then use this formula :
    =IF(TEXT(TIME(15,48,0),"hh:mm")=TEXT(NOW(),"hh:mm"),NOW(),0)

    if u want sec. also then
    =IF(TEXT(TIME(15,48,0),"hh:mm:ss")=TEXT(NOW(),"hh:mm:ss"),NOW(),0)


    also that A1 cell number formatting will be Time formatting
    pwnyadav007, You absolutely nailed it. Thank you for posting. I had been pondering this one for a long time with no success. I doubt I would have come to your solution on my own.

    I made one change which was to substitute the last NOW() with a cell reference D26 as below:
    =IF(TEXT(TIME(6,41,0),"hh:mm:ss")=TEXT(NOW(),"hh:mm:ss"),D26,0)

    If it is at the designated time it flashes the cell value for a second - all I need to log the value in an array and then back to 0

    A further modification which might allow use of functions like averageA and Istext would be
    =IF(TEXT(TIME(6,41,0),"hh:mm:ss")=TEXT(NOW(),"hh:mm:ss"),D26,"X")
    So I would be able to say average all numbers using averageA

    Tagged this thread as SOLVED because it is.
    Last edited by Mokwit; 09-16-2013 at 01:31 AM.

+ 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. Replies: 1
    Last Post: 07-01-2013, 11:31 PM
  2. Keep formula in designated cell
    By Jordans121 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2010, 10:24 PM
  3. Delete row with button from designated cell
    By tahoe132 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2009, 11:39 AM
  4. how do if fill down formula to designated last cell?
    By exceltools2 in forum Excel General
    Replies: 2
    Last Post: 12-23-2008, 05:51 PM
  5. Designated a cell as a name range
    By Fastbike in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2005, 11:31 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