For our workshop database, I'm trying to write a calculation, using
logical functions, that will fill in the lodging cost according to what
kind of room was requested ($525 for a single, $375 for a double, etc.)
-- but only for records whose status field does not read either
"cancelled" or "waiting." Can anyone help me diagnose why the following
formula does not work?
If ( status ="cancelled" or "waiting"; "0"; Case ( lodging request =
"single" ; "525"; lodging request = "double" ; "375"; lodging request =
"commuter" ; "150" ))
My intention is for the formula to return the value "0" if the status
field says "cancelled" or "waiting"; otherwise to evaluate the Case
function to fill in the correct lodging cost. It almost works.
Cancelled records are ignored, but not waiting ones. Using parentheses
in the If function -- ("cancelled" or "waiting") -- does not work
either. I'd be grateful for your advice.
Many thanks in advance.