Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda