i am building script in Google Spreadsheet that can find multiple results (like range of given dates) and then first display first result that script find. I need to show me how many results there is (like 'result 1/4') and that i have another button for 'next result' i have a list in one sheet with numbers:3545377i wanted to search another sheet and when script find that row i wanted to copy to another sheet but only that row. So in first run it will copy row 3, in second run it will copy row 5 etc.i have script that find and copy row based on one value but i wanted to modify it to search for multiple result and display it one by one (like button Next result)    function Get(){  //gets and formats data ranges, to and from sheets.var ss = SpreadsheetApp.openById(xxxxxxxxxxxxxxxxxxxxxxxxxx);var target = SpreadsheetApp.getActiveSpreadsheet();var source_sheet = ss.getSheetByName(Base_NG);var target_sheet = target.getSheetByName(Radni_sheet);var ID = target_sheet.getRange(E2); var searchString = ID.getValue();var column =1; //column Index   var columnValues = source_sheet.getRange(2, column, source_sheet.getLastRow()).getValues(); //1st is header rowvar searchResult = columnValues.findIndex(searchString); //Row Index - 2     if       (target_sheet.getRange('E2').getValue() == ) {     SpreadsheetApp.getActiveSpreadsheet().toast('ID nije upisan!')}  else {  //funkcija traenja po ID-u    if(searchResult != -1)    {        //searchResult + 2 is row index.      var values_search = source_sheet.getRange(searchResult + 2, 3).getValues();        //if function find result it will copy here CODE for copy    }}}//loop Array.prototype.findIndex = function(search){  if(search == ) return false;  for (var i=0; i<this.length; i++)    if (this[i].toString().indexOf(search) > -1 ) return i;  SpreadsheetApp.getActiveSpreadsheet().toast('ID ne postoji');  var target = SpreadsheetApp.getActiveSpreadsheet();  var target_sheet = target.getSheetByName(Radni_sheet);  target_sheet.getRange('E3:E18').clearContent();   return -1;
Google scripts search with manual next result option
google spreadsheets;google apps script