excel - Worksheet_Change determine value not content -


i trying detect if there changes in cell value, not particularly cell contents. have found multiple solutions find out if cell contents has changed, not work when cell equal cell.

for example, have cell a1 set equal b1 , b1 has formula calls in multiple other cells, not able go beginning , determine whether cell has changed that. needs come directly a1.

this 1 of examples found on site, not determine if value of a1 has changed, whether contents has changed.

private sub worksheet_change(byval target range)  if target.column = 1      cells(target.row, 3).value = date end if  end sub 

the function application.volatile true @ top of sub make sub calculate each time value in excel changes. need global variable stores last-known value of specified range, , time sub runs, start

if new_cell_value <> stored_global_variable then...  

and close

    stored_global_variable = new_cell value' end if 

see here further info [h/t vzczc original answer , method]: refresh excel vba function results


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -