Forum Discussion
disisme
Mar 01, 2024Copper Contributor
replacing text from a formula in another cell
I seek to interrogate the value in a cell (integer 0 or 1), and then arbitrarily force a text value into another free text entry cell. Example. A1 has an integer value that is unknown (and not rele...
disisme
Mar 02, 2024Copper Contributor
This actually generates a "Run-time error '424'...the explanation of which might as well be written in Mandarin for all the sense it makes. Error 424 says "object required" and the error line in debug is line 2.. "If Not Intersect(Range("E2").Value, Target) Is Nothing Then" (I am actually using E2 as the trigger and D2 as the data cell to change)
disisme
Mar 02, 2024Copper Contributor
Note this error 424 comes up no matter what value I put in E2 (0 or 1). Correction. The error comes up if I change the value in ANY cell.
- HansVogelaarMar 02, 2024MVP
My apologies, it was air code. It should have been
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("E2"), Target) Is Nothing Then If Range("E2").Value = 1 Then Application.EnableEvents = False Range("D2").Value = 0 Application.EnableEvents = True End If End If End Sub
- disismeMar 02, 2024Copper Contributorperrrrfect. Repeating line 5 with relevant cell number changes clears the sheet..awesome. thanks so much Hans