# Formulas Question - Complex formulas using multiple factors

Hello,

I'm dipping my toe into formulas - to date, I've used form rules to accomplish what I think formulas can, in a way that feels like the long way around (and requires you to actually open a record/save it, to fire the changes - whereas I believe formulas will just always be current with no manual intervention needed - please tell me if I am wrong).

My formula is complex with 4 choices - and each choice is a calculation of a couple of factors.

TL;DR: How do I factor in 4 choices that each use an **AND** function (how do I write "AND" in quickbase.... this is something I'm struggling to Google) - and/or is there a way to use an **OR** function, to get to each choice?

Detail:

I'm looking to say, "If *this *AND *that*, OR the other, then say *option 1*; if not, then if *this2* AND *that2*, then say *option 2;* if not, then if *this3* AND *that3* AND *not this other thing*, then say, *option 3*"

How do I get the functionality of **AND** in this context? Alternatively, I think I could get to this if I have an **OR** function as well

If this still doesn't make sense the way I'm asking, here's further detail:

The field ultimately is, "What formal services are available in this county (across all hospitals)?" based on two data points - the county either has hospitals with my program, are hospitals with state-certified programs, both, or neither.

- Prep:
- I created formula fields to count the # of hospital records with my program; # of hospitals that are state-certified; # of "hospitals who are both", and # of hospitals with neither

I believe the formula should basically be saying,

- If the county's # of hospitals with my program is greater than 0
**AND**its # of hospitals with state programs is greater than 0,**OR**its # of hospitals with both is >0, then "This county has Both."**If not....** - If the county # of hospitals with my program is 0
**AND**its # of state programs is greater than 0, then say "This county has state certified programs".**If not....** - If the county # of hospitals with my program is greater than 0
**AND**its # of state programs is 0, then "This county has my program."**If not** - Basically if everything else is zero, then "This county doesn't have a program".

------------------------------

Christine Kirk

------------------------------