Mega Newbie Simple Worksheet Change Event

jorjam28

New Member
Joined
Feb 14, 2005
Messages
2
First of all I have never used VBA. Second of all My previous macros/formulas were simple by the standards of all the posts I have read and I need step by step instructions. I have read several posts that seem to answer my question, but being the MEGA NEWBIE I don't know how to make it work.

I have a spreadsheet with drop down menus of Status item in three categories in Colums E, G and I. Column M is labeled 'Date'. What I need is a formula that will change the date in column M when I change the status of a cell (via dropdown) under E, G or I. I know this is simple but no luck so far.

If you can provide steps to paste code/formula it would relly help.

Thanks
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
HI

How about a bit more detail. What is the date going to change from/to. What are the selections. Is it a one only result, or is the formula to be used in many rows. Etc....


Tony
 
Upvote 0
The formula will be used on multple rows from drop down data under columns E, G and I. Colum E is AFE with drop down selections of "Working, Approved, etc."; Column G is Title with drop down selections of "Under review by broker, Under review by Attorney, Opinion Received, etc."; Column I is Surface with drop down selections of "Damages Negotiating, Agreement Negotiating, Agreement Prepared, Approved for Drilling, etc". Column M is date.

What I need is a formula or code that will place and save the date in Column M when a change is made to a drop down item under any of Columns E, G or I.

Does this help?
 
Upvote 0
Hi

Put in the following code to the worksheet change event.

Select the worksheet you want to action. Right click on the tab name, and select the View Code option. On the right hand drop down, select the change event and you should see a sub generate with no code.

Complete so that it is
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
If Not Intersect(Target, Range("E:E")) Is Nothing Then
ActiveCell.Offset(0, 8).Value = Evaluate("=today()")
End If

If Not Intersect(Target, Range("G:G")) Is Nothing Then
ActiveCell.Offset(0, 6).Value = Evaluate("=today()")
End If

If Not Intersect(Target, Range("I:I")) Is Nothing Then
ActiveCell.Offset(0, 4).Value = Evaluate("=today()")
End If
Application.EnableEvents = True
End Sub

When you make a change in column E, G, or I, it will put the current date into column M for the appropriate row.


HTH

Tony
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,220
Members
448,554
Latest member
Gleisner2

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