Dear BPC Friends,
I have written a VBA code to distribute the annual budget to the 12 months of the budget year. The client will enter annual budget in column highlighted in green color (screenshot attached) and then click ‘Distribute’ macro. This macro will distribute the annual budget number from Jan-Dec.
The VBA code is working fine, but when I press ‘Refresh’ all the columns disappear. Kindly see the attached screen for before and after refresh effect. I already checked the FPMXLClient.
My code is
Sub BudDist()
Dim myCell As Range
Dim Data As Long
Dim lr As Long
Dim a
lr = Cells(Rows.Count, 11).End(xlUp).Row
For Each myCell In Range("K39:K" & lr)
Data = myCell.Value / 12
a = myCell.Row
Range("N" & a & ":Y" & a).Value = Data
Next myCell
End Sub
Kindly help me with solving this problem.
Thanks,
Rahul