Place date stamp in cell based on adjacent cell value

weavera

New Member
Joined
Sep 1, 2014
Messages
10
Hi There,

Can anybody help with this please...


I'm using Excel 2010 on XP 32bit laptop.

I need to get a macro that will place the date in column "M" if column "L" has the text "Closed" in it. The date has to be the date that the "closed" text was applied to column "M" and should't change unless "M" is changed.

The top 4 rows are headers & waffle. The data starts in row 5.

Thanks in advance for reading. Any help is very much appreciated.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 12 And Target.Row > 4 Then
    Application.EnableEvents = False
    If Target.Value = "Closed" Then Target.Offset(, 1).Value = Date
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0
Thanks for so much for that...It didn't do anything though. Any other thoughts...Sorry to be a pain!
 
Upvote 0
Works here. It has to go in the sheet's code module (as described above) and macros must be enabled.

If you type Closed in column L the date should be inserted in column M.
 
Upvote 0

Forum statistics

Threads
1,226,237
Messages
6,189,792
Members
453,568
Latest member
LaTwiglet85

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