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

Does Excel have an IIF equivalent

Status
Not open for further replies.

rusty58

Technical User
Joined
Oct 27, 2004
Messages
1
Location
AU
Hi

Does excel have an equivalent function to IIF in Access?

The IF statement appears to about it.

Thanks
 
The usage for the if is similar to iif


=if(A1>10,"Yeah it's > 10","Try harder")

=if(A1>10,"Yeah it's > 10",C1)

=if(A1>10,b1,c1)

=if(and(A1>10,b1>10),"Yeah both are > 10","Try harder")

=if(or(A1>10,b1>10),"Yeah at least 1 of the 2 are > 10","Try harder")

 
Hi Rusty,

Not quite sure what your question means. The IIf (Immediate If) is essentially a function which provides 'if functionality' inline. In Access you can use it in queries or in VBA. In Excel (or any other app) you can use it in VBA. In an Excel worksheet, the IF function does exactly the same. What more do you want?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
AND...

you can use the IIF function in Excel Queries (Data/Get External Data...)

Skip,

[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top