Like below table I have 3 source & targets. Their distance range are same. I need to pick only one source cell from this table . So, need a comment "YES" for the picked one and "NO" for the rest by using a macro. Would you please help me on this.
All these source & targets are close proximate. So, I need to keep one & discard others. The criteria is to pick one source within the same distance range (<.2 KM) from the group.
Hello, according to your attachment an Excel basics VBA demonstration for starters :
Code:
Sub Demo1()
With [E6].Resize([B5].CurrentRegion.Rows.Count - 1)
.Value2 = Evaluate("IF(ROW(" & .Address & ")=RANDBETWEEN(" & .Row & "," & .Row + .Rows.Count - 1 & "),""YES"",""NO"")")
End With
End Sub
Do you like it ? So thanks to click on bottom right Like !