IIF

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This works for me: Expr10: IIf([Billing Term]="Collect",[Destination])
but how do I do the following or can I?
Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name] "COD" isNot
[Billing Term]"Collect",[Destination])
 
When you write your IIF think of it like this... IIF ( Condition, then do
something, otherwise do this) and they can be nested like... IIF (
Condition, then do something, IIF ( Condition, then do something, otherwise
do this))
Not sure what you are trying to accomplish in the second part of that
statement, but it seems as though you have a ")" out of order
Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name] "COD" isNot
[Billing Term]"Collect",[Destination])
try moving it to the end like...
Expr10: IIf([Billing Term]="Collect",[Destination],IIf( [Name] "COD" isNot
[Billing Term]"Collect",[Destination]))
I don't know that it will work because the second IIf( [Name] "COD" isNot
[Billing Term]"Collect"...doesn't make sense.
HTH
 
I played around and I got this to work:

IIf([Billing Term]="Collect",IIf([Name]="COD",[Destination])," ")

but can I do this: IIf([Billing Term]="Collect",[Destination]),IIf([Billing
Term]="Collect",IIf([Name]="COD",[Destination])," ")

Joe said:
When you write your IIF think of it like this... IIF ( Condition, then do
something, otherwise do this) and they can be nested like... IIF (
Condition, then do something, IIF ( Condition, then do something, otherwise
do this))
Not sure what you are trying to accomplish in the second part of that
statement, but it seems as though you have a ")" out of order
Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name] "COD" isNot
[Billing Term]"Collect",[Destination])
try moving it to the end like...
Expr10: IIf([Billing Term]="Collect",[Destination],IIf( [Name] "COD" isNot
[Billing Term]"Collect",[Destination]))
I don't know that it will work because the second IIf( [Name] "COD" isNot
[Billing Term]"Collect"...doesn't make sense.
HTH
--
Joe


pgarcia said:
This works for me: Expr10: IIf([Billing Term]="Collect",[Destination])
but how do I do the following or can I?
Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name] "COD" isNot
[Billing Term]"Collect",[Destination])
 
Still confused...
but can I do this: IIf([Billing Term]="Collect",[Destination]),IIf([Billing
Term]="Collect",IIf([Name]="COD",[Destination])," ")

The logic behind this is not making sense, explain what you are trying to
do, to me this is saying...
if the "billing term" is "collect, then show the "destination"...
but then you close the IIF with the ")" add another comma so it won't work
(syntax error)
think about it like:
IIF ( Condition, then do something, otherwise do this)
and where I have "otherwise do this" you can nest another complete IIF
statement.
 
Sorry that should have been like this: (but I understand, it works in Excel)

IIf([Billing Term]="Collect",[Destination]),IIf([Billing
Term]="Collect",IIf([Name]="COD",[Destination])," "))


But I got around it.


Joe said:
Still confused...
but can I do this: IIf([Billing Term]="Collect",[Destination]),IIf([Billing
Term]="Collect",IIf([Name]="COD",[Destination])," ")

The logic behind this is not making sense, explain what you are trying to
do, to me this is saying...
if the "billing term" is "collect, then show the "destination"...
but then you close the IIF with the ")" add another comma so it won't work
(syntax error)
think about it like:
IIF ( Condition, then do something, otherwise do this)
and where I have "otherwise do this" you can nest another complete IIF
statement.
 

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

Back
Top