Is there some way I can do an IF statement?

You can largely eliminate your “first column”

which essentially provides your IF condition.