简体   繁体   中英

How to filter based on the URL of an image in Google Sheets?

I'm trying to create a filter view in Google Sheets that will only show certain rows of the spreadsheet based on the last few characters of the URL of the images that are inserted in every row. For example, most rows have an image that is simply named "image1.png", "image2.png", "image3.png", etc, but every once in a while there'll be a row where the image is named "image63_s.png", "image176_s.png", "image271_s.png", etc. What I'd like to do is create a filter view that will only show rows where the name of the image in the URL ends with "_s".

EDIT: The images are inserted into the sheet with the formula =IMAGE("https://www.example.com/site/image1.png") , so I don't think regex can work here.

use custom formula:

=REGEXMATCH(A1, ".*_s.png$")

update:

=REGEXMATCH(FORMULATEXT(A1), ".*_s.png.*")

or as suggested have a hidden helper column of urls

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