C Programming Nested If Function In Excel