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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF formula syntax help 1

Status
Not open for further replies.

sandora

Technical User
May 17, 2005
57
US
Ver XI, AccessDB

This is what I have, but I don't know what the correct syntax would be to get it to work. These are trailer types and are defined in a formula 'trailer types'

F,UF,LQ,UL = 500
NL,UN = 200
C,UC <2000 = 25
>=2000 and <6000 = 50
>=6000 = 100

I was thinking if, then, else but you guys are so good at this stuff, I thought there might be a better way.
 
Ok, this may make more sense and it will work until I add the second condition for Total Vehicle Cost. Can anyone help, please.

if {00_Veh_Inventory.Veh Type} in ["F","UF","LQ","UL"] then 500
else
if {00_Veh_Inventory.Veh Type} in ["UN","NL"] then 200
else
if {00_Veh_Inventory.Veh Type} in ["C", "UC"] and

if {FI_Profit.Total Vehicle Cost} < 2000 then 25 or

if {FI_Profit.Total Vehicle Cost} => 2000 and <6000 then 50 or

if {FI_Profit.Total Vehicle Cost} >= 6000 then 100

else 0
 
That's much clearer. Try:

if {00_Veh_Inventory.Veh Type} in ["F","UF","LQ","UL"] then 500 else
if {00_Veh_Inventory.Veh Type} in ["UN","NL"] then 200 else
if {00_Veh_Inventory.Veh Type} in ["C", "UC"] then
(
if {FI_Profit.Total Vehicle Cost} < 2000 then 25 else
if {FI_Profit.Total Vehicle Cost} >= 2000 and
{FI_Profit.Total Vehicle Cost} < 6000 then 50 else
if {FI_Profit.Total Vehicle Cost} >= 6000 then 100
)
else 0

-LB
 
I knew I was close, thanks so much, works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top