-
How to use IIF condition
I am having data of city, against which i want state in next field and using iif condition.Getting error - The expression you entered has a function containing the wrong number of arguments.
city---State
AHMEDABAD,SURAT,VADODARA --- GUJARAT
MUMBAI,NAVI,PUNE --- MAHA
HYDERABAD,VISHAKAPATNAM --- ANDHRA
CHENNAI --- TAMIL
BANGLORE --- KARNA
GURGAON --- HARYANA
STATE: IIf([CELL],[AHMEDABAD],[Gujarat],iif([CELL],[SURAT],[Gujarat],iiF([CELL],[Vadodara],[Gujarat],IIf([CELL],[Mumbai],[Maha],IIf([CELL], [Navi],[Maha],IIf([CELL],[Pune],[Maha],IIf([CELL],[HYDERABAD],[Andhra],IIf([CELL],[VISHAKAPATNAM],[ANDHRA],IIf([CELL],[CHENNAI],[TAMIL],IIf([CELL],[BANGLORE],[KARNA],IIf([CELL],[GURGAON],[HARYANA])))))))))))
Want to know is there any other way i.e using (And,Or) in iif condition.
or some other way where two to three condition matches for similar result i.e city HYDERABAD,VISHAKAPATNAM Should have Andhra in state field.
-
Abbreviated Response
I suspect you are looking for something like this
State: IIf([City]='AHMEDABAD' Or [City]='SURAT','GUJARAT',IIf([City]='MUMBAI' Or [City]='NAVI','MAHA','No match'))
-
Thanks a ton
Hey Thanks
But want to know in a iif condition can we put three option i.e IIf([City]='AHMEDABAD' Or [City]='SURAT', Or [City]='VADODARA','GUJARAT'.
Please help...
-
Yes, it can take mutiple options.
-
Thanks
How it can be done, please show it..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules