Strange, but Interesting: It sounds like you are saying you are getting different results from these 2 logics:
_1) Alan’s first coding, (you claim that does not work for you):
Let Rng.Offset(0, 2).Value = ""
If Rng.Offset(0, 0).Value <> "" Then Let Rng.Offset(0, 2).Value = 1
_2) bradjedis’s latest possibly working…(appears initially to …. does what I need...)
If Rng.Offset(0, 0).Value <> "" Then Let Rng.Offset(0, 2).Value = 1
If Rng.Offset(0, 0).Value = "" Then Let Rng.Offset(0, 2).Value = ""
I can’t initially think why that should be, but I may have missed something or am just slow at getting the point again.
_.____________________________________________________________________
Remember wot I said about saving , closing and reopening after any changes before you do any testing. It may not appear to be necessary but it has been sometimes in the past, and occasionally helped to prevent some nasty crashes. If you forget to do that you might be mislead and end up going around in circles chasing your tail.
Remember also, as I said a few times, this is an interesting academic excessive for me. I would not necessarily recommend using this sort of thing, at least not without knowing the whole history of you and what all this is all about / for. As I said before. use at your risk.
( I use it. One reason: I sometimes learn the best, and get the most out of, fixing things when I occasionally unintentionally break them. )
_._____________________________________________________________________
Event coding method alternative....
Here a simple example:
Code: Select all
Option Explicit '
Private Sub Worksheet_Change(ByVal Target As Range) ' https://eileenslounge.com/viewtopic.php?p=303288#p303288
If Target.Cells.Count <> 1 Or Target.Column <> 5 Then Exit Sub ' I am only intersted in a cell change in column E
If Target.Offset(0, 0).Value <> "" Then Let Target.Offset(0, 2).Value = 1
If Target.Offset(0, 0).Value = "" Then Let Target.Offset(0, 2).Value = ""
End Sub
CodeInFirstWorksheetObjectCodeModule.xls https://app.box.com/s/a7k2izgyzqhd7f98hlaq9csw0l4tyyl6
_._______________________________________________________________________
Perhaps some more lateral thinking might help to solve that problem. Give auditors, maintainers, updaters something else to do instead. On average they cause as many problems as they solve, prevent, or repair, IMO. More emphasis should be put on the individual getting it right and knowing what he is doing in the first place, IMO. That is not a perfect solution either. There will be mistakes and problem later, maybe big ones, yes. But no more than all the controllers, auditor’s, maintainers, updater’s cause themselves: But giving the auditors and controllers a snow shovel and getting them to clear away the snow, (or insulate my pipes after I repaired them again), for me instead, would be a more efficient use of them , IMO. ( I can’t set them on my little train diverting project as I expect they wouldn’t have the bottle, moral inclination, or ability to do anything useful there without messing it up at some stage.)
_.____________________
I am not quite sure what you mean by that? As far as I am concerned he has my permission to use it. I hereby confirm that he may use it if he so chooses to!
Alan