Mark date when a drop down list option is selected

t_faragher13

New Member
Joined
Apr 5, 2011
Messages
12
I have a column with validation rules that only allow for the drop down list options to be selected. This is a live document to track the progress of particular actions.
I have date columns for each selection option. I would like a macro that adds the date to the appropriate column when each option is selected.
The drop down list column is F:F and each date column will be paced after this one.
Can anyone help with this?

Thanks

Tom :confused:
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try this: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 Then
    Application.EnableEvents = False
    Target.Offset(, 1).Value = Date
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0
What I'm trying to get is to have the macro recognise when a particular option is selected and then enter the date into that selctions particular date column.
The options that I would like a date for are:

Reviewed<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
DCR raised<o:p></o:p>
DCN awaiting approval<o:p></o:p>
Issued and controlled in SDD<o:p></o:p>
Issued , needs to go onto SDD.<o:p></o:p>
Being created

Thanks<o:p></o:p>
 
Upvote 0
Nah I said it in the first post.
Column F has the drop down list and then the date columns will continue after (G-L) in accordance with list given.
 
Upvote 0
Try

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
If Target.Column = 6 Then
    Application.EnableEvents = False
    Select Case Target.Value
        Case "Reviewed": i = 1
        Case "DCR raised": i = 2
        Case "DCN awaiting approval": i = 3
        Case "Issued and controlled in SDD": i = 4
        Case "Issued, needs to go onto SDD:": i = 5
        Case "Being created": i = 6
    End Select
    Target.Offset(, i).Value = Date
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0
Strangely when I select "Issued, needs to go onto SDD" the date is entered into the drop list column F instead of K??
 
Upvote 0
Check that the text in the code is exactly the same as your drop-down text. Adjust the code accordingly
 
Upvote 0
This runs OK until I select and delete more than one of the drop down list cells. I get a run time error '13' mismatch message.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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