Auto populate a field with a date when other field is selected from a validation list

AusSteelMan

Board Regular
Joined
Sep 4, 2009
Messages
208
Hi everyone,

In the following extract, I would like to have today's date placed into Col K when an entry is made into Col J.

Entry into Col J is from a validation list of 3 options. What I desire is that when one of these options is selected ("Complete"), then I would like today's date to be written into Col K.

Currently Col K has a validation list which comprises dates from 1st of each month from July to June.

I need a fixed date as text preferably, so was thinking the VBA function "Date" on a Change Workbook Sub. I don't know how to do this and am hoping you could help me.

The information is currently part of a Table in Excel 2007 that has about 500 records.

Thankyou to everyone who takes the read my post and to those who can help me.

IdeasList

*JK
*
**
**

<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 79px"><COL style="WIDTH: 80px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]Status[/TD]
[TD="align: center"]Month Completed[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]In Progress[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]Complete[/TD]
[TD="align: center"]Jul-13[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

</TBODY>

Data Validation in Spreadsheet
CellAllowDatasInput 1Input 2
J4List*=ValidationList_Status*
K4List*=ValidationList_Months*

<TBODY>
</TBODY>

<TBODY>
</TBODY>


Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi..

Add this to your sheet code..

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim a As String
If Target.Column <> 10 Then Exit Sub
If Target.Value = "Completed" Then
a = Target.Address
Range(a).Offset(0, 1).Value = Format(Now, "long date")
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,101
Messages
6,170,116
Members
452,302
Latest member
TaMere

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