Using the function if overlapping

A post was merged into an existing topic: function and ifelse