Automatic date when data entered in another field :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Automatic date when data entered in another field
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

cjmcma
Welcome to the Board


Joined: 20 Sep 2003
Posts: 4

Flag: Blank

Status: Offline

 Reply with quote  

Automatic date when data entered in another field

I would like to have the current date entered in one column when data is entered in the next column. Wondering if this can be done without a macro. I've thought of using the now() function but the next day of use, yesterday's dates will update to today. I'm guessing I will have to write code, which is fine, but if there was an easier way, I'm all for it.

Post Sat Sep 20, 2003 10:17 pm 
 View user's profile Send private message

DRJ
Board Master
Board  Master


Joined: 18 Feb 2002
Posts: 1022
Location: California
Flag: Usa

Status: Offline

 Reply with quote  

Re: Automatic date when data entered in another field

Put this code in the worksheet code section for the worksheets you want this to work on.

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column = 1 Then
Range("B" & Target.Row) = Date
Else
End If


End Sub

Target.column is the column you are entering data in. change as needed

Range("B") is the column where you want to put the date. Change as needed

Post Sat Sep 20, 2003 10:56 pm 
 View user's profile Send private message Send e-mail

bosco_yip
Board Master


Joined: 03 Dec 2002
Posts: 183


Status: Offline

 Reply with quote  

Re: Automatic date when data entered in another field

1) Say your data at column B2:B10

2) Enter formula in A2 and drag to A10

=IF(B2<>"",TODAY(),"")

3) After the first day work, you highlighted range of Column A cells with data in the side, then click Copy>> Paste special >> Value.

Hope can helps

Regards
Bosco

Post Sat Sep 20, 2003 11:02 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.