newbie-ish: iif in query

Gates Is Antichrist

Well-known Member
Joined
Aug 15, 2002
Messages
1,961
Apparently I can not define a field as

MyField: IIf(Left$([NAME],3)=”ABC”,"",[NAME])

The query designer forces square brackets, a la [”ABC”]
and then interprets it as an unknown field (the popup that essentially asks " What is ["ABC"] ?").

IIf and Left appear to be supported in this context so now I'm stuck. Help?

A2000 on Win2000. TIA.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Aya,

This worked for me:
myfield: IIf(Left$([name],3)="ABC","",[name])

I'm not sure why you're having trouble, suspect it's something else in the query...

AH! It's your silly quotes around ABC. Use normal quotes and you'll be okay.

HTH,
 
Upvote 0
Silly quotes as in ””

Normal quotes as is ""

You could just cut and paste my formula into your query too.

HTH,
 
Upvote 0
Note: when that dreaded irritating popup (i.e. input box) happens, I can just type ABC (just the letters) and hit enter, and I'm rock and roll. Ergo, I am able to function, but have to respond to that input box.

I still don't get what funny silly double quotes are :(
 
Upvote 0
You're using what are called right double quotes. ””
See how they're slanted

Use straight up and down quotes instead. Hit shift and then the button one to the left of enter.

Again, try copying my formula to your query.

HTH,
-Cort
 
Upvote 0
:idea:

I built the query in Microsoft Word. It has non generic open and close quotes. DOHHHHH

Way to go. Muchos Gs. The streets are again safe now.

Now all I have to do is understand what "normal" is. Just a personal problem :D

Sorry to run you around so much. We had a little timing problem :)
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top