Word command to display date (now)

bubba06

New Member
Joined
May 16, 2006
Messages
13
Is there a formula or something where a specific word is selected the next cell will come up with the date(now)

Thanks in advance
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
how about in cell B2

Code:
=IF(A2="donkey",TODAY(),"")
 
Upvote 0
hmmm, I think you need to be specific.

what is the word you are using in the cell that should trigger the date?
what cell is the word in?
what cell do you want the date in?

(please give cell references like cell A2 etc)

Also, when you say "not quite", what result are you actually getting?
 
Upvote 0
Hi - sorry 4 the late reply -the word is "Completed" the column is D3:D80 - E3:E80 is the date if completed
 
Upvote 0
Is there a formula or something where a specific word is selected the next cell will come up with the date(now)

Thanks in advance

Try this in code
Code:
Sub fromhere()
If Selection.Text = "Completed" Then Selection.Offset(1, 0) = Date
End Sub
 
Upvote 0
Hi,
In cell E3 use the formula
Code:
=IF(D3="Completed",TODAY(),"")

or

Code:
=IF(D3="Completed",NOW(),"")

format the cell as Date.

However, when you access the worksheet tomorrow, it will show tomorrow's date.
I'm sure this is not what you wanted to achieve.
I would suggest you use Villy's vba solution
 
Upvote 0
Assuming you have no other purpose for the cell entry, try this bit of code

Right click the page tab you are using and click on view code .

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False

        Dim rng As Range
         '   Only look at single cell changes
        If Target.Count > 1 Then Exit Sub
        '   Set Target Range
        Set rng = Range("d3:d80")
        '   Only look at that range
        If Intersect(Target, rng) Is Nothing Then Exit Sub

Dim ce As Range
    For Each ce In Range("d3:d" & Range("d80").End(xlUp).Row)
        If ce.Value = "Completed" Then
            If ce.Offset(0, 1).Value = "" Then
                ce.Offset(0, 1).Value = Date
            End If
        Else
            ce.Offset(0, 1).Value = ""
        End If
     Next ce

Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,531
Messages
6,179,384
Members
452,908
Latest member
MTDelphis

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
Back
Top