Filter Alpha items in UPC's (1 Viewer)

smilman

New member
Local time
Today, 08:24
Joined
Jan 17, 2019
Messages
5
Dear Query Experts,

I want to highlight UPC's containing alpha characters in a UPC list. I can do this by the statement Non UPC: IIf(InStr(1,[IMMFNO],"A")>0,"Non UPC",""). This statement will bring up all UPC's that contain the letter A. How can I select UPC's that contain any letter "A thru Z" without writing 26 statements?

Did I say you guys are the best and I really appreciate your timely help?

Thanks & regards
Scott
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:24
Joined
Oct 29, 2018
Messages
21,457
Hi Scott. Not sure if this will work but try something like: WHERE FieldName Like "*[a-zA-Z]*"
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:24
Joined
Feb 19, 2013
Messages
16,610
suggest use the Like

perhaps something like

Non UPC: IIf([IMMFNO] Like "*[A-Z]*","Non UPC","")

you might find this link useful
https://support.office.com/en-us/ar...aracters-939e153f-bd30-47e4-a763-61897c87b3f4

an alternative is to come at it from the other end - assuming UPC has alpha chars (and numeric perhaps) and anything else is all numeric you could instead use

Non UPC: IIf(isnumeric([IMMFNO]),"","Non UPC")
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:24
Joined
Feb 28, 2001
Messages
27,148
CJ's answer is probably easier to code and because it is a built-in inspection function, is likely to be coded efficiently.
 

smilman

New member
Local time
Today, 08:24
Joined
Jan 17, 2019
Messages
5
Non UPC: IIf([IMMFNO] Like "*[A-Z]*","Non UPC","") worked perfectly - thank-you.
 

Users who are viewing this thread

Top Bottom