This could be fine, if the only changes are user-changes -- which is the most typical -- but it is possible for the worksheet's cell values to change when it is not the active sheet via programmatic changes, e.g. Dim cell_to_test As Range, cells_changed As Range Set cells_changed = Target(1, 1) Set cell_to_test = Range( RANGE_OF_CELLS_TO_DETECT ) If Not Intersect(cells_changed, cell_to_test) Is Nothing Then Macro End If I have a cell which is linked to online stock database and updated frequently.
The event handlers take an argument "Target As Range", so you can check if the range that's changing includes the cell you're interested in.
This could have occurred because either: This formatting will cause Excel to interpret anything that is subsequently entered into the cell (including formulas) as text.
error when a formula tries to divide a number by 0 or an empty cell. Change the value of cell A2 to a value that is not equal to 0. Prevent the error from being displayed by using the logical function IF. You type in a function and when you press Enter, the cell displays the actual function text, instead of calculating the function's value.This problem often arises because the cells containing the formula are formatted as 'text' instead of the 'General' type.This can be done using Excel's Text To Columns tool as follows: When activated, this option displays all formulas in the current Worksheet.The option is located in the options panel, under 'Advanced' options.