Using * in condition of IIF statement

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

Guest

Is it possbile to use an * in the conditions of an IF statement ex:

Name: IIF([Name]=*ADP*,"1st","2nd"

What we want to do is find all names with ADP somewhere in the name and then
return the true statement. How can this be done?

Thanks
 
Patricia said:
Is it possbile to use an * in the conditions of an IF statement ex:

Name: IIF([Name]=*ADP*,"1st","2nd"

What we want to do is find all names with ADP somewhere in the name and then
return the true statement.


You need to use the Like operator when you want to use a
wildcard comparison:

Name: IIf([Name] Like "*ADP*", "1st", "2nd")
 

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