An old friend who teaches at a performing arts school recently asked me to look at a script for a short film, written by one of his students, that they are planning to film. It's the story of a young man who decides that using his gift for comedy is more important than going to college.
The problem with the script is that the writer doesn't have a gift for comedy and therefore neither does the character. If you're going to write a convincing funny character, you have to be able to be funny yourself. That brings me to a question I've been asked quite a few times:
Sorry, but I think the answer is no. If you are naturally funny, certainly you can learn how best to channel that into screenplays or novels or essays, and the difference between writing for stand-up, sketches, sitcoms, movies, and plays. You can also learn how how to compose works that integrate comedy and drama.
However, if you don't start with a knack for comedy--which usually means you have an ability to see things from a different perspective--reading a book about the theory of threes, or why words starting with consonants are funnier than words that start with vowels, or that exaggeration is important, probably will not work for you.
HOW TO FIND OUT WHETHER YOU'RE FUNNY
If you don't know whether or not you're funny (plenty of people who aren't, think they are), ask an honest friend whether they think humor is one of your greatest strengths.
That gives them the chance to say, "Hey, sure you're funny, but actually I think your greatest strengths are (x, y, z)."
Translation: "You're not funny."
WHAT IF YOU'RE NOT FUNNY?
Write to your strengths. If you're not naturally funny, write drama, thrillers, horror, romance, or any of the other genres. Your gift, like that of my friend's student, may lie in other areas.