I have to have atlest 4 rows for each manager (mgr col) and so that HR can assign task to each of them. HR will add values in new col, they can assign task up to 4 based. I am thinking to create a macro that can check minimum 4 lines for each manager if less than 4 add it and if more then no need to add.
For example:
Dep Mgr Task
1 jerry cheese
1 jerry bread
2 tom milk
Expected output:
Dep Mgr Task HRtask
1 jerry cheese ---
1 jerry bread ---
1 jerry --- ---
1 jerry --- ---
2 tom milk ---
2 tom --- ---
2 tom --- ---
2 tom --- ---
--- is blank here.
what I found on internet
Sub Insert4RowsWithCondition()
' here starting with A3 cell but need to set on unique value in that mgr col automatically
Range("A3").Select
Do Until ActiveCell.Value =""
Selection.EntireRow.Insert
Selection.EntireRow.Insert
ActiveCell.Offset(3,0).Select
Loop
error It is adding 2 new blank rows after each line which is not useful in my case.