简体   繁体   中英

Wildcard Query Search Google Sheets

I am looking to add wildcard ability. Current formula:

=query('data set',"select E where B contains '"&B37&"'",0)

The issue is that the data set may have slight variation of the referenced cell and I want to accommodate for that.

Try: =query('data set':A,E,"select E where LOWER(B) like '%"&LOWER(B37)&"%'",0) in a separate sheet or from row F in your 'data set' tab. B37 is where your match criteria is.

...assuming your range on the 'data set' tab is from A:E .

LOWER(B) in the query helps to make it case-insensitive. To use a wild card, instead of contains use like then add the wildcard character % inside the single quotes '%"&LOWER(B37)&"%' .

You'll need to wrap LOWER() around B37 so that the LOWER(B) in the query works as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM