![]() |
worksheet_change question
I have a spreadsheet that users may update. When they do update a value, I
want to check that it falls within certain ranges dependant on other cells in the sheet (so I can't use the data validation function). I am using worksheet_change which works OK in terms of detecting a change, but how can I find out which cell they have changed. I tried using activecell, but that does not work if they move to another cell using the mouse, rather than pressing return. Any Ideas Thanks |
worksheet_change question
Create duplicate cells that you want to refer to on your input worksheet. Let's say your input worksheet is Sheet1 and ranges you want to validate the input against in Sheet 2 and 3. Sheet1!A1=Sheet2!B10 Sheet1!A2=Sheet3!C45 Now you can use data validation by using values on A1 and A2 on Sheet1. -- renegan ------------------------------------------------------------------------ renegan's Profile: http://www.excelforum.com/member.php...o&userid=10450 View this thread: http://www.excelforum.com/showthread...hreadid=528159 |
worksheet_change question
The argument of the change function is Target as Range and that is the cell
that was just changed... Add this code to your change event to see what I mean msgbox "Cell " & target.address & " was changed to " & target.value -- HTH... Jim Thomlinson "HRman" wrote: I have a spreadsheet that users may update. When they do update a value, I want to check that it falls within certain ranges dependant on other cells in the sheet (so I can't use the data validation function). I am using worksheet_change which works OK in terms of detecting a change, but how can I find out which cell they have changed. I tried using activecell, but that does not work if they move to another cell using the mouse, rather than pressing return. Any Ideas Thanks |
All times are GMT +1. The time now is 07:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com