Excel/VBA for dragging down a formula
i am trying to write a script that would drag down the formula in a table based on the number of entries in another worksheet column.
I have a table in table in A9:T:23 (row 9 us headers) on the worksheet "Report". It is pulling data from another tab "S401 Tickets". S401 tab is an ever growing database. As additional data gets added to it, I want the user to be able to run a macro that will drag the formula in A10 of the table the total distance to grab all the data in column A of the "S401 Tickets" tab.
For example, currently the table on the "report" tab runs to row 23. If 10 more rows of data get added to "S401 Tickets" I would like the Macro to pull the data down in column A of table to row 33.
Dim LR As Long
LR = Sheets("S401 Tickets").Range("A" & Rows.Count).End(xlUp).Row
.Range("A10:D10").AutoFill Destination:=.Range("A10:D" & LR + 10), Type:=xlFillDefault
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here