+ Reply to Thread
Results 1 to 5 of 5

Auto Insert Date and time and calculate Age based .

  1. #1
    Registered User
    Join Date
    07-11-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    4

    Auto Insert Date and time and calculate Age based .

    Dear all..

    Kindly help me with macro for the below requirement..

    I have an Excel sheet..
    Where the column "J" is a status column
    K - date Column
    L- Time Column
    M- TAT Column
    N- Age Column

    When I enter the word as "Pending" in Column "J", I should get the Age in Column "N" with reference to current date and it should change on next day and so on.

    When I enter the word as "Closed" in Column "J", I should Get that Static Date in "K" and Static Time in "L" and Column "N" should go blank.

    Regards
    SANU PN

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Auto Insert Date and time and calculate Age based .

    what I am giving is an event code (not standard macro)

    right click the sheet tab
    click view code
    in the window that comes up copy paste this event code and save the file as macro enabled file

    Please Login or Register  to view this content.

    now go to the sheet in column j (any blank cell) type Pending (be careful about spelling)
    see what happens to column N in that row , that will be today's day and will change tomorrow
    in any other cell in col J if you type "closed" what happens to col K to N in that row

    test and confirm to newsgroup
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Auto Insert Date and time and calculate Age based .

    Hi, venkat1926,

    see what happens to column N in that row , that will be today's day and will change tomorrow
    As you put in a static date that should never change, AFAIK you would neeed to insert a Formula there.

    And I´m afraid the area in Column L and M should not be ckeared but converted to static Date and Time and only Column N be cleared.

    Ciao,
    Holger.
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    07-11-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    4

    Re: Auto Insert Date and time and calculate Age based .

    Hi..

    Looks not working for my requirement..
    I will explain the requirement here..


    I have an Excel sheet..

    Where the column "J" is a status column
    K - date Column
    L- Time Column

    When I enter the word as "Pending" in Column "J", I should get the difference of Column "C" with Current Date in "O" Also Difference of Column "D" with Current Time in "P"


    When I enter the word as "Closed" in Column "J", I should Get that Static Date in "K" and Static Time in "L" and Column "N" & "O" should go blank
    Also should calculate Column "C" -"K" in Column "M" and calculate Column "D" -"L" in Column "N"

    Regards
    SANU PN

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Auto Insert Date and time and calculate Age based .

    Hi, SANU PN,

    please attach a sample workbook for us to test (I´m not so sure about the Forumlas you have inserted inside the cells) and please make sure on one sheet situation as is and on another one as requested. Please fill in some of the formulas to give us a clou what to insert as formula.

    Ciao,
    Holger

+ 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] Calculate time remaining based on end date & time and current date
    By Kaz09 in forum Excel Formulas & Functions
    Replies: 33
    Last Post: 08-19-2014, 07:11 AM
  2. Complex VBA problem auto insert date and time, auto insert comment, etc.
    By rojashan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 09:40 PM
  3. Insert Auto Date & Time Stamp
    By fredkapao in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-18-2012, 12:59 PM
  4. Auto insert date+time with value in cell
    By Christeen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2011, 07:02 PM
  5. Auto Insert System Date & Time
    By Buks in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-24-2009, 07:55 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