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

152
Vistas
Is there a way to do a For loop to a string variable and then add in each loop 6 letters to it with initial value 'A1:A',first loop 'G1:G' -javascript

I would like to do a for loop with "CantAMS = 10" beeing the amount of loops I need and each time I loop to add 6 letters to my variables ColumnasAm, AMName, Ammail, and Check. I have it writen now as an array of 10 X 1 and later loop through it, but I would like to create either a function or a for loop if possible where I add 6 letters to my variable each time it loops through it.

const CantAMS = 10
const ColumnasAm = ['A1:A', 'G1:G', 'M1:M','S1:S','Y1:Y','AE1:AE','AK1:AK','AQ1:AQ','AW1:AW','BC1:BC'];
const AMName = [ ws.getRange('A2').getValue(), ws.getRange('G2').getValue(),  ws.getRange('M2').getValue(),ws.getRange('S2').getValue(),ws.getRange('Y2').getValue(),ws.getRange('AE2').getValue(),ws.getRange('AK2').getValue(),ws.getRange('AQ2').getValue(),ws.getRange('AW2').getValue(),ws.getRange('BC2').getValue()];
const Ammail = [ ws.getRange('B2').getValue(), ws.getRange('H2').getValue(),  ws.getRange('N2').getValue(),ws.getRange('T2').getValue(),ws.getRange('Z2').getValue(), ws.getRange('AF2').getValue(),ws.getRange('AL2').getValue(),ws.getRange('AR2').getValue(),ws.getRange('AX2').getValue(),ws.getRange('BD2').getValue()];
const Check = [ ws.getRange('A5').getValue(), ws.getRange('G5').getValue(),  ws.getRange('M5').getValue(),ws.getRange('S5').getValue(),ws.getRange('Y5').getValue(),ws.getRange('AE5').getValue(),ws.getRange('AK5').getValue(),ws.getRange('AQ5').getValue(),ws.getRange('AW5').getValue(),ws.getRange('BC5').getValue()];
const Columni = [1,7,13,19,25,31,37,43,49,55];
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