ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to make a macro or function run after entering data in a cell? (https://www.excelbanter.com/excel-worksheet-functions/143584-how-make-macro-function-run-after-entering-data-cell.html)

Bruce[_2_]

How to make a macro or function run after entering data in a cell?
 
How can I have a macro run that copies cells down when creating a new entry?
I would like to have several different columns, when items are modified, to
run some code. How can I do this? I have found samples of is specific CELLS
are modified via intersect, but I am not sure how to have it done via column
changes.

Thanks
Bruce


JMB

How to make a macro or function run after entering data in a cell?
 
Try this - right click on your tab, view code, and paste this in (which would
run when changes are made to columns A, C, or F.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A:A, C:C, F:F"), Target) Is Nothing Then Exit Sub

Application.EnableEvents = False
MsgBox "Do Something"
Application.EnableEvents = True

End Sub



"Bruce" wrote:

How can I have a macro run that copies cells down when creating a new entry?
I would like to have several different columns, when items are modified, to
run some code. How can I do this? I have found samples of is specific CELLS
are modified via intersect, but I am not sure how to have it done via column
changes.

Thanks
Bruce




All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com