Help with IF Formula/Is Blank, Is Not Blank

As a relative novice with IF Formulas, I am hoping for help with the following.

My table has columns for First Name, Last Name and With First, With Last. I am using Airtable to track RSVPs and would like a Formula field that provides the following result.

When Last Name is not blank and With Last is not blank, enter 2. (John Smith is bringing Sally Smith, so 2 people are attending).

When Last Name is not blank and With Last is blank, enter 1. (John Smith is coming by himself, so 1 person is attending).

I appreciate any guidance on how to achieve this result.

Thank you!

Hi John,

Try this:
IF({Last Name},IF({With Last},2,1),0)

3 Likes

Thanks so much, Claudio! This worked like a charm. Cheers!

John