IIf

P

Pass-the-reality

I have 2 IIf Statements that I need to combined into one -

Type: IIf([PlanType]="LPPO" Or [PlanType]="RPPO","PPO")
Type: IIf([PlanType]="HMO" Or [PlanType]="HMO-POS","HMO")

How would I say IIf Plan Type = LPPO or RPPO insert PPO (ex 1) OR if Plan
Type = HMO or HMO-POS insert HMO (ex 2) in one expression?
 
B

Brendan Reynolds

Pass-the-reality said:
I have 2 IIf Statements that I need to combined into one -

Type: IIf([PlanType]="LPPO" Or [PlanType]="RPPO","PPO")
Type: IIf([PlanType]="HMO" Or [PlanType]="HMO-POS","HMO")

How would I say IIf Plan Type = LPPO or RPPO insert PPO (ex 1) OR if Plan
Type = HMO or HMO-POS insert HMO (ex 2) in one expression?


This is untested, but I believe should work ...

IIf([PlanType]="LPPO" Or [PlanType]="RPPO","PPO",IIf([PlanType]="HMO" Or
[PlanType]="HMO-POS","HMO"))

If it is possible for PlanType to be none of the above, you can add a third
argument to the inner IIf() to handle that possibility ...

IIf([PlanType]="LPPO" Or [PlanType]="RPPO","PPO",IIf([PlanType]="HMO" Or
[PlanType]="HMO-POS","HMO","N/A"))
 
R

RonaldoOneNil

Type: IIf([PlanType]="LPPO" Or [PlanType]="RPPO","PPO",IIf([PlanType]="HMO"
Or [PlanType]="HMO-POS","HMO","NEITHER"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top