A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | How To Dynamically Display Images in Google Sheets from Google Drive Extract Substrings from urls Use =REGEXEXTRACT() and =VLOOKUP() to extract and build a valid url from a list Use Data Validation to Select Photos from Dropdown List Use =IMAGE() to display image in cell from the dynamically created url FILE -> MAKE A COPY to edit this sheet | ||||||||||||||
2 | End Result Below. Select Item from DropDown List in B4 to Display Image in G4 | ||||||||||||||
3 | |||||||||||||||
4 | together | ||||||||||||||
5 | |||||||||||||||
6 | |||||||||||||||
7 | |||||||||||||||
8 | List of Items w corresponding image urls | ||||||||||||||
9 | lateralus | https://drive.google.com/file/d/1IaO08gj3GWIUQDAnzKEob62Gcl87ufuN/view?usp=sharing | Named Ranges Used to Make Life Easier | ||||||||||||
10 | blanket | https://drive.google.com/file/d/1i_iuOhZhe0bEwatdtA1jowz1GmYTKuEY/view?usp=sharing | B4 | itemSelect | |||||||||||
11 | bloom | https://drive.google.com/file/d/1n68C2n-yXrvVHRSUW-uvQgZEZ4S6xlns/view?usp=sharing | B8:G13 | pictureMatch | |||||||||||
12 | edge | https://drive.google.com/file/d/1Y5lzg0csvGdCMzEA_-BcMzxMp43vb2Pm/view?usp=sharing | B8:B16 | pictureName | |||||||||||
13 | eyed | https://drive.google.com/file/d/1QH3StdPhc20OAPE73DJF3s08ReQmEmNI/view?usp=sharing | D8:D16 | pictureURL | |||||||||||
14 | together | https://drive.google.com/file/d/1aAXy_qaT5GUcGTZSMZAHJZZiuj3r2VBh/view?usp=sharing | |||||||||||||
15 | foundation | https://drive.google.com/file/d/1vvTU0jBFeMo32nATVTkyocNI4uDbfMWb/view?usp=sharing | |||||||||||||
16 | heavy-metal-machine | https://drive.google.com/file/d/1mI6841E73HqL8zO1aGGSclUWkDpXiIya/view?usp=sharing | Beginning of URL Needed to Build Shareable =IMAGE() link | ||||||||||||
17 | sieis | https://drive.google.com/file/d/1rR8U619GrpG4Zx-8RneA8yaZAe0wodQU/view?usp=sharing | https://drive.google.com/uc?export=download&id= | ||||||||||||
18 | |||||||||||||||
19 | |||||||||||||||
20 | |||||||||||||||
21 | For Getting the ID | FUNCTION | |||||||||||||
22 | Using =MID() | ||||||||||||||
23 | /1IaO08gj3GWIUQDAnzKEob62Gcl87ufuN/ | =MID(D9,32,35) | |||||||||||||
24 | |||||||||||||||
25 | USING REGEXEXTRACT | ||||||||||||||
26 | 1IaO08gj3GWIUQDAnzKEob62Gcl87ufuN | =REGEXEXTRACT(D9,".*/d/(.*)/") | |||||||||||||
27 | |||||||||||||||
28 | |||||||||||||||
29 | FOR USING THE DROPDOWN SELECTOR | FUNCTION | |||||||||||||
30 | Using =VLOOKUP() | ||||||||||||||
31 | https://drive.google.com/file/d/1aAXy_qaT5GUcGTZSMZAHJZZiuj3r2VBh/view?usp=sharing | =VLOOKUP(itemSelect,pictureMatch,3,0) | |||||||||||||
32 | |||||||||||||||
33 | Putting it All Together | ||||||||||||||
34 | =IMAGE(J17®EXEXTRACT(VLOOKUP(itemSelect,pictureMatch,3,false),".*/d/(.*)/")) | ||||||||||||||
35 | |||||||||||||||
36 | |||||||||||||||
37 | |||||||||||||||
38 |