Plan De Cuentas Contables Venezuela Excel Vba !new! Jun 2026

Sub FormatearPlan() Dim i As Long Dim nivel As Integer Dim ultimaFila As Long ultimaFila = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To ultimaFila 'Contamos los puntos para determinar el nivel nivel = Len(Cells(i, 1)) - Len(Replace(Cells(i, 1), ".", "")) + 1 Cells(i, 4).Value = nivel 'Aplicamos formato With Cells(i, 2) .InsertIndent nivel If nivel <= 2 Then .Font.Bold = True Else .Font.Bold = False End If End With Next i MsgBox "Formato de Plan de Cuentas actualizado.", vbInformation End Sub Use code with caution. 5. Consideraciones para el entorno venezolano

Sub ValidarJerarquia() Dim ws As Worksheet Dim ultimaFila As Long Dim i As Long Dim codigoActual As String Dim nivelActual As Integer Dim codPadre As String Dim errorMsg As String Set ws = ThisWorkbook.Sheets("Maestro_Cuentas") ultimaFila = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row plan de cuentas contables venezuela excel vba

End Sub