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

217
Vistas
Presents Do Without Loop Error (very rusty)

I've generated quite a large code that works to transform payroll data into a new system but am struggling with my final two codes prior to including them... This being one of them. This one presents a 'Do without Loop' error. The return text values are in there as I still need to workout how to return another column effectively (I assume adding a result range might assist with this? but one step at a time). Any help/guidance would be amazing! :)

    Sub Ceiling_Test()

    Dim Ref_Ceiling_Row As String
    Dim Ref_Ceiling_Col As String
    Dim Ceiling As String
    Dim Ref_Role_Row As String
    Dim Ref_Role_Col As String
    Dim Role As String
    Dim Counter_Ceiling As Long
    
    'Locate Ref Ceiling
    Ref_Ceiling_Row = Sheets(1).Range("F2").Row
    Ref_Ceiling_Col = Sheets(1).Range("F2").Column
    'Loop
    Do
        If Cells(Ref_Ceiling_Row + Counter_Ceiling + 1, Ref_Ceiling_Col) = "" Then Exit Do
        Ceiling = Cells(Ref_Ceiling_Row + Counter_Ceiling + 1, Ref_Ceiling_Col)
        If Ceiling = "General Manager" Then
            Cells(Ref_Ceiling_Row + Counter_Ceiling + 1, Ref_Ceiling_Col + 30) = "external_uuid:WAV"
            
        ElseIf Ceiling = "Director" Then
            Cells(Ref_Ceiling_Row + Counter_Ceiling + 1, Ref_Ceiling_Col + 5) = "Return corresponding value in AG"
            
        ElseIf Ceiling = "Executive Manager" Then
            Cells(Ref_Ceiling_Row + Counter_Ceiling + 1, Ref_Ceiling_Col + 5) = "Return corresponding value in AF"
    End If
        Counter_Ceiling = Counter_Ceiling + 1
    Loop
    
    'Locate Ref Role
    Ref_Role_Row = Sheets(1).Range("H2").Row
    Ref_Role_Col = Sheets(1).Range("H2").Column
    'Loop
    Do
        If Cells(Ref_Role_Row + Counter_Ceiling + 1, Ref_Role_Col) = "" Then Exit Do
        Role = Cells(Ref_Role_Row + Counter_Ceiling + 1, Ref_Role_Col)
        If Role = "Manager" Or Role = "Employee" Then
            Cells(Ref_Role_Row + Counter_Ceiling + 1, Ref_Role_Col + 28) = "Home Org Value in O"
        End If
        Counter_Ceiling = Counter_Ceiling + 1
    Loop
    
End Sub
about 4 years ago · Santiago Trujillo
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