Student or Learner
Is 'if yes/if so/if no' formal enough for a formal writing?
I have never heard of "IF YES". "If so" and "If not" are used both for formal and informal writing. However, it's more formal to say "otherwise" instead of "if not".