Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
How to do a google sheet cell similar match

I want to search each cell in a column for a similar match. How do I do that? e.g. if cell value is "New delhi" the search id " New" should search the cell instead of the full text.I am unable to use Match with if.

function doGet(e){
 return search(e) ;
}  

function search(e){
 var id = e.parameter.id;
  
  var values = sheet.getRange(2, 1, sheet.getLastRow()-1,sheet.getLastColumn()).getValues();
  
  let a = [];
  for (var i = 0; i < values.length; i++) {
    if (values[i][0] == id || values[i][1] == id) {
      a.push(values[i][2]);
    }
  }
  if(a) return ContentService.createTextOutput(a.join(',')).setMimeType(ContentService.MimeType.TEXT);
  return ContentService.createTextOutput("Id not found").setMimeType(ContentService.MimeType.TEXT);
  
}

  

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda