Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function not working #3

Open
davidchapuis opened this issue Aug 31, 2022 · 0 comments
Open

function not working #3

davidchapuis opened this issue Aug 31, 2022 · 0 comments

Comments

@davidchapuis
Copy link

Hello ZLOOKUP friends,

I tried to implement the function but it does not work at all, the column where the returned values should appear remains empty. I checked the data already. It shouldn't be the case. I also tried to change the threshold and it does not change anything.
I have ZLOOKUP, lev and my function in the same file.
Please find a code snippet below. Is there something wrong in the implementation?

  var lastMain = sheet.getLastRow();
  var lastPlays = sheetPlays.getLastRow();
  // create an array for the data to be looked up (C2 to last row of J column in plays) 
  var dataLookUpPlays = sheetPlays.getRange(2,3,lastPlays,8).getValues();
  // create an array for the data to be searched for
  var valuesToSearchPlays = sheet.getRange(2,3,lastMain,1).getValues();
  // create an array for the data to be created (plays)
  var playsData = sheet.getRange(2,8,lastMain,1).getValues();

  // update cells in plays column with data from spreadsheet with plays
    for (i=0;i<lastMain;++i){
      playsData[i] = ZLOOKUP(valuesToSearchPlays,dataLookUpPlays,7,60);
      sheet.getRange(i+2,8).setValue(playsData[i]);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant