PC Review


Reply
Thread Tools Rate Thread

Create a date that will not change

 
 
mrlanier@hotmail.com
Guest
Posts: n/a
 
      24th Dec 2006
If a cell returns a certain value, can a date be made to appear in an
adjacent cell that will not change even if the first cell's value does
change with time. For example, if cell A1>=1, then B1 shows the date
A1=1, even though A1 will eventually excede the value of 1 (therefore
A1>=1). I need a date macro that will show only the first date A1>=0.
Thanks.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      24th Dec 2006
The macro in Worksheet code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value = 1 And Range("B1").Value = "" Then
Range("B1").Value = Format(Now, "mm/dd/yyyy")
End If
End Sub

waits until A1 = 1 It then sets the current date in B1.

Once a date has been entered in B1 the macro will not change it.
--
Gary's Student


"(E-Mail Removed)" wrote:

> If a cell returns a certain value, can a date be made to appear in an
> adjacent cell that will not change even if the first cell's value does
> change with time. For example, if cell A1>=1, then B1 shows the date
> A1=1, even though A1 will eventually excede the value of 1 (therefore
> A1>=1). I need a date macro that will show only the first date A1>=0.
> Thanks.
>
>

 
Reply With Quote
 
mrlanier@hotmail.com
Guest
Posts: n/a
 
      24th Dec 2006
Thanks so much for the Christmas present. It works as expected.

Michael

Gary''s Student wrote:
> The macro in Worksheet code:
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Range("A1").Value = 1 And Range("B1").Value = "" Then
> Range("B1").Value = Format(Now, "mm/dd/yyyy")
> End If
> End Sub
>
> waits until A1 = 1 It then sets the current date in B1.
>
> Once a date has been entered in B1 the macro will not change it.
> --
> Gary's Student
>
>
> "(E-Mail Removed)" wrote:
>
> > If a cell returns a certain value, can a date be made to appear in an
> > adjacent cell that will not change even if the first cell's value does
> > change with time. For example, if cell A1>=1, then B1 shows the date
> > A1=1, even though A1 will eventually excede the value of 1 (therefore
> > A1>=1). I need a date macro that will show only the first date A1>=0.
> > Thanks.
> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a date that will not change mrlanier@hotmail.com Microsoft Excel Misc 2 24th Dec 2006 08:11 PM
Use date modified to change format & create filter to track change =?Utf-8?B?UEFS?= Microsoft Excel Worksheet Functions 0 15th Nov 2006 09:17 PM
Change Create Date M.Siler Windows XP General 11 13th Sep 2006 08:38 AM
How can I change a date in labels I create? =?Utf-8?B?RGF2ZXNwcmluY2Vzczgy?= Microsoft Word Document Management 1 16th Oct 2005 07:01 PM
Create a macro to change Task:Due Date =?Utf-8?B?THlubg==?= Microsoft Outlook VBA Programming 1 2nd Feb 2005 05:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 AM.