by Sisyphus » Tue Aug 28, 2012 7:19 am
Hello lostNexcel,
Your method is absolutely commendable! I work the same way.
However, I also suggest that you look at how Charles solved your problem. His code, apparently successful tests the range B3 if it contains "0".
This means two things.
Firstly, the cell isn't blank as you earlier suggested.
Secondly, that it contains text rather than a number.
Look at this particular line in earlier suggestions. The test failed because the wrong thing was tested. Had you not posted the workbook we might not have guessed the format of the cell, instead relying on what you told us about it.
I am explaining this to you because it is rather odd to enter numbers in Text format, and the now successful code will fail if a text zero isn't entered. So, if you decide to handle the test cell in a more conventional manner in future you should be able to get the code to work again by amending the test here discussed.
Convention wouldn't have numbers entered as text and would prefer nothing over entering zero. If no zero entry is required the cell can be recognised as blank regardless of its format. On the other hand, if it is formatted as number a test would see it as containing a zero value regardless of whether it is blank or holds zero.
Have a great day!
Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)