Please use Code Tags when posting code - see Item #2 of the Rules

http://www.excelforum.com/showthread.php?t=591596

Why not use an nested IF Function instead of a UDF?