+ Reply to Thread
Results 1 to 11 of 11

date and time needs to be auto populate when i insert data in another column.

  1. #1
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    date and time needs to be auto populate when i insert data in another column.

    Hi Team,

    I have the function below in A1 column, below function I was tried to use because when I enter data in B column i need the data entered date and time in B column, however I have entered data in B1 and B2 column around 10 am and I got the exact date/time populated in A1 & A2 column, I am happy with that but after 2 hours I entered data in B3 and B4 column but the issue is data & time has been changed to current date from A1 to A4 column. Please advise and assist us on getting new function to auto populate the data and time in A column. No need macrosssssssssssss.

    =if(COUNTA(b1)>0,Now(),"")


    Regards
    Girish
    Last edited by Giri.hb; 06-29-2014 at 01:14 AM. Reason: changed the title

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: date and time needs to be auto populate when i insert data in another column.

    Girish,

    Interesting problem. I'm not sure that you can do this without a macro because excel recalculates when you make changes. I've not seen a way to only recalculate some cells. As you have already discovered, the formula will be correct when you enter the data but subsequent recalculation will result in ALL cells recalculating. Smarter people on here might have a solution or know how to stop subsequent recalculations but I'd be leaning towards a macro to do this.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: date and time needs to be auto populate when i insert data in another column.

    Not sure I understand what you want Can you upload a sample workbook showing what you have and what you want please
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: date and time needs to be auto populate when i insert data in another column.

    FDibbens,
    I think he wants the time of data entry in a cell in column B to be shown in the adjoining Column A cell.
    Because he's using now() it recalculates and they all update rather than just the latest cell entry.

  5. #5
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: date and time needs to be auto populate when i insert data in another column.

    Thank u. I already have the macro but I am using a shared file more than 10 people using this sheet. Please try to get some function instead of macro please...

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: date and time needs to be auto populate when i insert data in another column.

    You can create a UDF (User Defined Function) to achieve this. So instead of using NOW(), you will need to use the function defined by you to get the static date and time. Are you comfortable with UDF?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  7. #7
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: date and time needs to be auto populate when i insert data in another column.

    Sure let me know how to do that,I am not so familiar on that. Please help....

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: date and time needs to be auto populate when i insert data in another column.

    OK follow these steps...

    - Open VBA Editor by pressing Alt + F11 --> Insert --> Module --> Then in the opened code window, paste the code given below --> Close VBA Editor --> Save your worbook as Excel Macro-Enabled Workbook --> That's it.

    Now in your sheet you can use UDF as follows

    in A2

    Please Login or Register  to view this content.
    and custom format the date column as dd/mm/yyyy h:mm or format of your choice.

    UDF

    Please Login or Register  to view this content.
    Does this help?

  9. #9
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: date and time needs to be auto populate when i insert data in another column.

    Sktneer,

    While this isn't my problem I'm interested in the solution. My limited understanding is the UDF will still be run every time the sheet recalculates resulting in the same problem the OP had with all cells returning the same and most recent time. What is it that only runs the UDF once?

  10. #10
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: date and time needs to be auto populate when i insert data in another column.

    Double post :-)
    Last edited by Crooza; 06-29-2014 at 02:46 AM.

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: date and time needs to be auto populate when i insert data in another column.

    @Crooza
    UDF will be recalculated in A2 if B2 is changed or A2 is edited and this even will not affect the other cells in col. A having this UDF. That's what I think. In fact I have never used it before so not sure about the every aspect of it.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: date and time needs to be auto populate when i insert data in another column.

    Quote Originally Posted by Giri.hb View Post
    Please try to get some function instead of macro please...
    Goto this site:

    http://www.mcgimpsey.com/excel/timestamp.html

    You want to use the method described as: Using circular references and worksheet functions.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Payroll time sheet calculation where time exceeds 24 hours
    By Rolo1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2014, 08:57 AM
  2. [SOLVED]Time/Date calculation to check response time
    By tailz in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-01-2013, 10:20 AM
  3. [SOLVED] Calculation of seconds from Start time and End time
    By uday1969 in forum Excel General
    Replies: 12
    Last Post: 06-13-2012, 03:21 PM
  4. Replies: 11
    Last Post: 05-20-2011, 02:09 PM
  5. Specific time period calculation from a time range
    By Khaldon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2011, 06:44 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