Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9707

I need a script/equation to reference sheetname to trigger info being pulled into a cell from another sheet

$
0
0

Trying to figure out what I think is an "if/then" command. But I'm hopeless at writing them.

I have a template that I've built for one sheet and a second sheet with all the info to be referenced.

Sheet1 is named "FO_VFX_010"

Sheet2 is named "All_shots"

"All_shots" contains columns that list all the shots in the sequence, (FO_VFX_010 to FO_VFX_670) counting by 10's so 010, 020, 030, 040 etc. This is located in cells A2-A68

B2-B68 contain thumbnail images. One for each shot.

example

What I want to figure out is this. Is there a way to have a script or an equation in "FO_VFX_010" that basically says, if the sheetname is "this" (the same shot name as in column A on "All_shots" ) then pull the thumbnail from Column B for the corresponding shot and display it in this cell on "FO_VFX_010".

The reason is, I'm building "FO_VFX_010" as a template, that will be duplicated and renamed for each shot in the show. So separate tabs for "FO_VFX_010", "FO_VFX_020", "FO_VFX_030" etc. As each tab is created I want the script or equation to look at the sheetname and update to the correct thumbnail.

End result will display the thumbnail in a merged cell located on "FO_VFX_010" covering merged cells C3,C4,C5D3,D4,D5. I assume it would be looking for the address of FO_VFX_010!(C3).

Does that make sense? is that even possible??

Someone on reddit pointed me in this direction, but I do not have the needed coding ability to transform it into functional code:


function putImageInCell() {  let url ='https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png';   const ss = SpreadsheetApp.getActiveSpreadsheet();   const s = ss.getSheetByName('Sheet1');   const r = s.getRange('A1');   r.setFormula(=image("${url}"));   SpreadsheetApp.flush();   r.copyTo(r,{contentsOnly: true});   SpreadsheetApp.flush(); }

I can kit-bash code, but man, I can't write it to save my life.

So any suggestions from you nice folks would need a little handholding of..paste this here, add this command in this cell here to make magic happen.

Thanks in advance!


Viewing all articles
Browse latest Browse all 9707

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>