While the two poems come at it from very different angles, the basic principle is the same - use your life to do what you can to make the world a better place for yourself and for all who surround you.
"If" is a more serious presentation of the advice for how to live so as to earn the respect of others. The boy to whom the poem's advice is addressed is encouraged to keep himself under control, not following the crowd in hasty decisions or opinions; to use reasoned and sound judgement in carrying out actions without condemning or condescending to those who act impulsively. "If" the boy succeeds in following the directions for conduct given through the poem, he will earn "the Earth and everything that's in it."
"Laugh and Be Merry" encourages the listener to "better the world with a song." While it doesn't have as many explicit examples of negative and positive behavior as "If," the poem instructs listeners regarding how to act in order to make the world a better, more pleasant place in which to live for all God's creatures.
"Laugh and be merry together, like brothers akin" - "If all men count with you" - both poems present approaches to life that will, if followed, end with good relationships being built among all.