I have a database that shows exposure indicators at a monthly rate with dates that showcase break dates for each client individually. For formatting reasons, I've been asked to show the break dates by adding rows with the same client info but having the exposure indicators in annual order (one row with the exposure from 2020, other for 2021 and so on) while conserving the columns for the months (like a staircase for each client).
My first attempt was to add a VBA function that copies the entire row when the count was higher than 12(dont mind the spanish plz):
Sub RepetirFilas()
Dim i As Long
Dim UltFila As Long
i = 50002
ActiveCell.SpecialCells(xlLastCell).Select
UltFila = ActiveCell.Row
Do
If Cells(i, 44) > 12 Then
Rows(i).Select
Selection.Copy
Selection.Insert Shift:=xlDown
UltFila = UltFila + 1
i = i + 1
End If
i = i + 1
Loop While i <= UltFila
End Sub
But this method paste the entire row and creates double data which clutters the analysis, so from there i'm basically stuck since my ability to code on VBA is limited.