Hello,
I have half a program and just wondering if someone can help me complete rest.
The program will always have varying lengths of input data inColumn B (depending on imported text – can be longer or shorter). Column H Bottom Cell Value is based on Column Bfor last empty and then pulls in Static Value from Q2 into last empty cell(this works fine).
The Next part is a bit more complicated. So after setting the new Active Cell (cell above the last empty value), I now need it to perform a formula. The Formula would be the new Active Cell = H16-G16. But that value could not be specific for Range H16 and G16 since it will
always change due to the length of column B (so would need to be some kind of offset formula based on active cell location).
Lastly, after formula piece is figured out, need one last piece of code to have it copy up the formula to last empty in H.
Any help would be greatly appreciated.
Thanks – Jenny B.
Current Program
Sub TotalShares()
Range("B1").End(xlDown).Offset(0, 6).Select
ActiveCell = Range("Q2")
ActiveCell.Offset(-1, 0).Select
'ActiveCell.Formula = "=" >>> Need formuala in NEW Active Cell that (Which is H16 in this instance - but will vary) to math formula that would subtract H16-G16 and then fill all up formula
End Sub
Tran Date | Stmt Tran Type | Gross Amt | Net Amt | Price per Share | Shares Increased/D | Total Shares | Actual Tran Type | Enter Current Share Balance |
05/09/11 | MERGER | 10.670 | 10.670 | 11.9000 | 24.6020 | | MERGER | 0.193 |
01/07/14 | Plan Distribution | 0.280 | 0.280 | 18.8700 | 0.0150 | | Div Reinvested | |
04/01/14 | Plan Distribution | 0.280 | 0.280 | 23.2600 | 0.0120 | | Div Reinvested | |
06/30/14 | Plan Distribution | 0.420 | 0.420 | 26.8900 | 0.0160 | | Div Reinvested | |
09/17/14 | Plan Distribution | 0.420 | 0.420 | 33.8700 | 0.0120 | | Div Reinvested | |
01/07/15 | Plan Distribution | 0.420 | 0.420 | 42.3800 | 0.0100 | | Div Reinvested | |
03/31/15 | Plan Distribution | 0.420 | 0.420 | 43.4008 | 0.0100 | | Div Reinvested | |
06/29/15 | Plan Distribution | 0.540 | 0.540 | 34.6692 | 0.0160 | | Div Reinvested | |
09/15/15 | Plan Distribution | 0.540 | 0.540 | 38.8948 | 0.0140 | | Div Reinvested | |
01/12/16 | Plan Distribution | 0.540 | 0.540 | 42.4425 | 0.0130 | | Div Reinvested | |
03/30/16 | Plan Distribution | 0.540 | 0.540 | 43.6188 | 0.0120 | | Div Reinvested | |
07/05/16 | Plan Distribution | 0.710 | 0.710 | 38.6886 | 0.0180 | | Div Reinvested | |
09/13/16 | Plan Distribution | 0.710 | 0.710 | 38.8237 | 0.0180 | | Div Reinvested | |
01/10/17 | Plan Distribution | 0.720 | 0.720 | 50.6400 | 0.0140 | 0.180 | Div Reinvested | |
04/04/17 | Plan Distribution | 0.720 | 0.720 | 54.240 | 0.0130 | 0.193 | Div Reinvested | |