title: Search for value and return row number
body: <p>I'm struggle with this script. I need to search for today date, once match it return column number (done!). I need a script to do the same with row number. The script I have is works fine if I keep only one table on that sheet, but I have more tables and if I use values.length -1 will return last row from the sheet. Also, every table might not have a fixed row numbers, so need to be dynamic. </p>
  
  <p>This is the script I have so far: </p>
  
  <pre><code>function getTodaysTotal() {
    function toDateFormat(date) {
  try {return date.setHours(0,0,0,0);}
  catch(e) {return;}
   }
  
  var values = SpreadsheetApp
    .openById("id")
    .getSheetByName("Q3 - W27 - 39")
    .getDataRange()
    .getValues();
  
  
  var today = toDateFormat(new Date());
  var todaysColumn = values[5].map(toDateFormat).map(Number).indexOf(+today);
  var output = values[values.length - 1][todaysColumn];
  var emailDate = Utilities.formatDate(new Date(today),"GMT+1", "dd/MM/yyyy");
  </code></pre>
  
  <p>And that's a screen shoot of my table. </p>
  
  <p><a href="https://i.stack.imgur.com/bQRxJ.png" rel="nofollow noreferrer">table</a></p>
  
  <p>Hope it make sense. I have the column number and I need to find row number that contain Total. </p>
  
  <p>Thank you! </p>
  
  <p>Kind regards</p>