Need help with if/then formula

I am trying to make a simple formula that would show a total amount available between two fields if a third field had a particular category in it.

IF {Type of Credit}=“Credit Card” then({Total Credit}-{Total Amount Due:})

I have not been successful getting the syntax right, but I am a new user to airtable and am probably still thinking like a spreadsheet…

Thank you for your help! Colleen

You’re very close:

IF(
    {Type of Credit}='Credit Card',
    {Total Credit}-{Total Amount Due:}
    )

That will leave the field blank if {Type of Credit} is anything other than 'Credit Card'.

Thank you W_Vann_Hall, I appreciate the quick response. I was close, but not correct!