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