The ends justify the means.
What matters is not how you achieve something, but what is achieved. For instance, lying may be permissible if you accomplish some worthwhile goal by lying. Taken to its logical conclusion, as many rulers such as Hitler, Mao, and Stalin have done, even the murder of millions of people may be acceptable in order to achieve some end.
Most people, especially the best people, have an innate inclination to govern their lives by some set of moral rules. But they never really clearly define those rules, and violate the rules when they find it inconvenient to live by them. Thus their life is a muddled conflict between their desire to achieve their goals at all costs, and their desire to act ethically.
The means justify the ends.
Once you determine your rules, you should learn to accept whatever results accrue from living life according to those rules. For instance, if lying isn’t permissible, you must learn to accept the consequences of honesty.
Your rules are for your own benefit; you may wish that others live by the same set of rules, but you have power only over your own actions, not over the actions of others. The rules serve a completely selfish purpose: to make your own life more rewarding, and thus it is, to some extent, irrelevant as to whether others live by your rules of conduct. (Although you may find life most rewarding if, to the degree possible, you seek interaction with those who share your values and abide by a similar set of rules.)
It’s not that end results don’t matter — they do — or that you should be equally happy with any results as long as you live ethically. You may be quite unhappy with the results, at least in the short term. The decision to live by a certain set of ethical rules is simply to say that in the overall context of life, end results only have value if they are achieved in a morally acceptable way. It is the process, the means, that determines the value of any end.
On the process of creating value, rather than short-unit results.