![]() |
Copy paste formula up to a cell using VBA
Hello all
I have a little problem and i need help I have two worksheets. In the first one i manually add historic data (every time different size). In the second one I have formulas based on the historic data. I want to add the formula only in the first row and then using a button to copy paste the formulas up to the cell that the historic data ends. I used this code but the problem is that i do not know how to define B? which every time will be different one Range("A1:B1").Select Selection.AutoFill Destination:=Range("A2:B?"), Type:=xlFillDefault Range("A2:B?").Select Range("A1").Select A1 and B1 contains the formulas So if for example in Sheet1 i have historic data from A1-A500 (the size varies ) I want formulas in Sheet 2 to be calculated up to cell B500 I am really stuck with this one. Thanks in advance AngelikiS |
Copy paste formula up to a cell using VBA
|
All times are GMT +1. The time now is 05:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com