Home

Additional Shares Macro Automated

Greg Bonaparte
Contributor

The 3 steps below prompt me to manually enter "SUGGESTED SHARES" from "UN-ALLOCATED FUNDS" into the "ADDITIONAL SHARES" cell.
If possible I would like to automate this process. The cells at the top ie "U30" would use up "UN-ALLOCATED FUNDS" first.


1) SUGGESTED SHARES =ROUNDDOWN(($Y$17-$Y$18)/$Q30,0)
2) UN-ALLOCATED FUNDS =$Y$17-$Y$18
3) ADDITIONAL SHARES see macro below

Sub ADDITIONALSHARES()
'
' ADDITIONALSHARES Macro
'

'

Dim KeyCells As Range

' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("U30:U600")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then

' Display a message when one of the designated cells has been
' changed.
' Place your code here.
StarStopCalc

End If
End Sub

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
217 Replies