Run a Macro when a User Changes a Specific Cell, Range, or Any Cell in Excel

preview_player
Показать описание

200+ Video Tutorials - 200+ Downloadable Excel Reference Files - 50+ Hours of Content

Simple way to run Excel vba macros when a user makes a change within the worksheet - this tutorial covers three different scenarios: when the user changes a specific cell, when the user changes something within a range of cells, and when a user changes any cell within a worksheet.

This is a step-by-step explanation that covers everything you need to know, including multiple methods for identifying the cell that was changed, how to abstract range references to make your code more efficient and easier to manage, and how to reference regular macros from the code that figures out if a macro should be run or not.

I hope you find this tutorial helpful!

Рекомендации по теме
Комментарии
Автор


200+ Video Tutorials - 200+ Downloadable Excel Reference Files - 50+ Hours of Content

TeachExcel
Автор

copy it, paste it, forget it - such a good logic, used it so many times

millsiom
Автор

Couldn't understand better. Amazingly explained. Thank you

davecks
Автор

Oh. My. God. I spent an hour googling stuff before I found this amazing video. The beginning part of where to put the code is the key, and not found anywhere else. Thank you!

nishantbhargava
Автор

Thanks a lot! Now I'll finally be able to do what I was trying to achieve.

raulbader
Автор

Excellent video!! Helped me understand a lot of things in one video!! Thank you!!

lmajiedmary
Автор

This is great - I have looked at 20 different sites that all have different syntax - I have spun in circles trouble shooting a basic problem of the trigger not firing - I knew it was a simple issue - thanks !!!!

jdklc
Автор

Brilliantly explained - helped me for firing on filling of values in range to send email automatically with macro2-thanks a lot

Darshanam-Jatra
Автор

SUPERB!
Clearly explained and well taught...

unitedelectricfootballleag
Автор

Excellent video. I think this is going to help me alot.

exclusivelynyc
Автор

Very well explained! In fact I was wondering how to run 2 worksheet change events in one Macro. I tried many times without success

nadermounir
Автор

Great! Is it "Thanks for the video = Something" or "Not thanks for the video = Nothing".. haha! For the single cell test, I thought that you could just use: If Target = Range("A1") Then.. But, after tinkering with your code, I discovered that leaving off the .Address from Target.Address and Range("A1").Address will produce some wonky results. Thanks for that bit of learning. Typically, I use the If Not Intersect method anyway, even for a single cell reference. For some time, it confused me, because I was thinking: "if (pause) not intersect() is nothing". Then I realized that it is: "if not (pause) intersect() is nothing". I hope that helps someone struggling with it. Once I put the mental pause in the right place, the code made total sense and I've never confused it since. Thanks for sharing your knowledge.. it helps me move forward a little bit each day. Thumbs up!

wayneedmondson
Автор

Thank You
I Really Appreciate your way of explanation the topic you are talking about
Thank You Again, Have a Nice Time with Great Regards

Ashrafhaa
Автор

You helped solve my problem! Many Thanks!

stewiegriffin
Автор

Great video! It really helped me in solving the problems I was running into. Thank you!!

MsThing
Автор

Hi this demo is exactly what I’m looking for (change within a range). This is the cheeky part. Is it possible to run a demo working with Google Sheets? Many thx Del

deldavis
Автор

Excellent John! Now, if I change multiple cells all within the Intersect Range by dragging down the cell above, how can the script be changed to acknowledge the changed cells and react accordingly? The current example you used only recognizes the cell used to drag down.

michaelramsey
Автор

Nice Video ! I appreciate that you've shared this useful clip with us .
Can this method be applied in case of multiple ranges and execute corresponding subroutines ?
If it was, Can you share such like method ?

ROUKWA_S
Автор

Excellent Tutorial. A huge help. Thank you

EithneDolan
Автор

I'm a mac user. As soon as I hit (general) dropdown I get "Variable uses Automation type not supported in Visual Basic? I've read that I can code it in I typed what you wrote, but still no joy.

asylux