ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding A Date To Adjacent Cell (https://www.excelbanter.com/excel-worksheet-functions/260183-adding-date-adjacent-cell.html)

FS

Adding A Date To Adjacent Cell
 
I need to know if there is a simple formula to add the current (static) date
into the adjacent cell by entering a specific # into another cell.
Example: by entering 100 into cell A1, I'd like to see the date apear in
cell B1.
Thanks, FS

Luke M[_4_]

Adding A Date To Adjacent Cell
 
You need VB. Right click on sheet tab, view code. Paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
If Target.Value = 100 Then Target.Offset(0, 1) = Date
End Sub

--
Best Regards,

Luke M
"FS" wrote in message
...
I need to know if there is a simple formula to add the current (static)
date
into the adjacent cell by entering a specific # into another cell.
Example: by entering 100 into cell A1, I'd like to see the date apear in
cell B1.
Thanks, FS





Gord Dibben

Adding A Date To Adjacent Cell
 
There are a couple of methods to create a static date pointed out on John
McGimpsey's site.

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

One uses circular references and worksheet function NOW()

Other uses VBA


Gord Dibben MS Excel MVP

On Mon, 29 Mar 2010 12:17:01 -0700, FS wrote:

I need to know if there is a simple formula to add the current (static) date
into the adjacent cell by entering a specific # into another cell.
Example: by entering 100 into cell A1, I'd like to see the date apear in
cell B1.
Thanks, FS




All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com