On Cell change event vba
Closed
ar14
Posts
1
Registration date
Monday 19 October 2015
Status
Member
Last seen
19 October 2015
-
19 Oct 2015 à 06:34
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 19 Oct 2015 à 11:53
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 19 Oct 2015 à 11:53
Related:
- On Cell change event vba
- Vba find - Guide
- Vba case like - Guide
- Change lg tv name - Guide
- Change computer name - Guide
- Idm language change - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
19 Oct 2015 à 11:53
19 Oct 2015 à 11:53
Hi Ar14,
A blank/empty cell is not the same as zero/0.
May the code below guide you. First clear the cell (A1) and run the code, then put a zero in the cell and run the code again and you will see.
Best regards,
Trowa
A blank/empty cell is not the same as zero/0.
May the code below guide you. First clear the cell (A1) and run the code, then put a zero in the cell and run the code again and you will see.
Sub RunMe()
If Range("A1") = vbNullString Then Range("A1").Value = "Cell was blank"
If Range("A1") = 0 Then Range(" A1").Value = "Cell contained a zero"
End Sub
Best regards,
Trowa