ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I automatically run a macro on data entry? (https://www.excelbanter.com/excel-discussion-misc-queries/207159-can-i-automatically-run-macro-data-entry.html)

Deena

Can I automatically run a macro on data entry?
 
I have a table of data that I sort using a Macro. However to improve user
friendliness I would like to start this when the data in cell A20 is entered
or updated. IS this possible?

Sheeloo[_3_]

Can I automatically run a macro on data entry?
 
Yes, by using worksheet_change as follows;
Sub worksheet_change(ByVal target As Range)

If Not Intersect(cell, Range("A20")) Is Nothing Then
'Call your sort macro
End If

End Sub
--
Always provide your feedback so that others know whether the solution worked
or problem still persists ...


"Deena" wrote:

I have a table of data that I sort using a Macro. However to improve user
friendliness I would like to start this when the data in cell A20 is entered
or updated. IS this possible?



All times are GMT +1. The time now is 12:37 AM.

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