EXCEL DATE/TIMESTAMP

PaulDJ

New Member
Joined
Sep 27, 2006
Messages
2
HOW DO I DATE STAMP/TIME STAMP A INPUT FIELD BUT MAKE SURE IT DOESNT CHANGE WHEN THE NEXT ENTRY BELOW IS ENTERED EG:
A1 IS THE DATA INPUT FIELD B1 IS THE FORMULA FOR DATE AND TIME WHICH I COPY DOWN THE COLUMN
A1 DATA ENTERED B1 GIVES ME DATE AND TIME BUT WHEN A2 IS ENTERED THE TIME CHANGES NOT ONLY IN B2 BUT IN B1 TOO. ITS A BIT OF A BUGGER
MY B COLUM FORMULA IS AS FOLLOWS:
=IF(A3=",",IF(B3="",NOW(),B3),NOW())
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

You don't with a formula which will keep calculating. You need VBA. Do a Board Search for "Time Stamp"...There are plenty of relevant discussions that include the necessary code.

HTH,

Smitty

P.S. Your Caps Lock is stuck.
 

PaulDJ

New Member
Joined
Sep 27, 2006
Messages
2
Oops Thanx
Did a date stamp search came up with nix and thanx for the welcome!!
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
"Nix"... Does that mean you didn't find anything?

Here's code that will put the date in coloumn B for an entry in the corresponding column in A:

<font face=Tahoma><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Change(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range)
    <SPAN style="color:#00007F">Dim</SPAN> rng <SPAN style="color:#00007F">As</SPAN> Range
         <SPAN style="color:#007F00">'   Only look at single cell changes</SPAN>
        <SPAN style="color:#00007F">If</SPAN> Target.Count > 1 <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
        <SPAN style="color:#007F00">'   Set Target Range</SPAN>
        Set rng = Range("A:A")
        <SPAN style="color:#007F00">'   Only look at that range</SPAN>
        <SPAN style="color:#00007F">If</SPAN> Intersect(Target, rng) <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
            <SPAN style="color:#007F00">'   Action if Condition(s) are met</SPAN>
            Target.Offset(, 1) = <SPAN style="color:#00007F">Date</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>

HTH,

Smitty
 

Forum statistics

Threads
1,141,757
Messages
5,708,340
Members
421,566
Latest member
7Nabisco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top