Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

imbedded if (or) statement

Status
Not open for further replies.

gman249

Technical User
May 2, 2003
2
US
I am trying to duplicate an imbedded if statement into approach, and I can't get the formula right. The following is the spreadsheet formula that I am trying to duplicate into approach. Any help would be appreciated. Thanks,
Gary
=IF(OR(PAY_G=1,PAY_G=4,),"Facility/Self/Agency",IF(OR(PAY_G=10,PAY_G=20,),"Insurance",IF(OR(PAY_G=23,PAY_G=26,),"Facility/Self/Agency",IF(OR(PAY_G=13,PAY_G=35),"Medicare",IF(OR(PAY_G=999,PAY_G=12),"Blue Cross",IF(OR(PAY_G=999,PAY_G=11),"Blue Shield",IF(OR(PAY_G=16,PAY_G=40),"MediCal/CCS/CCAH","Noone")))))))
 
It's more readable to create a series of linked calculated fields. You can build the formulae with point & click until you become familiar with the syntax. An apostrophe, not quotes, is the string delimiter in a calc field formula. Something like this where Calc1 will display the result:

Calc1
IF(PAY_G=1 or PAY_G=4 or PAY_G=23 or PAY_G=26, 'Facility/Self/Agency', Calc2)

Calc2
IF(PAY_G=10 or PAY_G=20, 'Insurance', Calc3)

Calc3
IF(PAY_G=13 or PAY_G=35, 'Medicare', Calc4)

Calc4
IF(PAY_G=999 or PAY_G=12, 'Blue Cross', Calc5)

Calc5
IF(PAY_G=999 or PAY_G=11, 'Blue Shield', Calc6)

Calc6
IF(PAY_G=16 or PAY_G=40, 'MediCal/CCS/CCAH', 'Noone')

Paul Bent
Northwind IT Systems
 
That worked out great!! Thanks for the help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top