Wacky function with Ternary working

Wacky function with Ternary working