![]() |
Macro to find end of column data
I have a range of data (ex: A1:F20) and in the column (g) next to the
data i have a formula that adds certain fields. I am constantly adding rows of data, so what I want is a macro that will find the last row of data in column F, then paste the formula from the last row of column G down to that row. Any help is appreciated. Thanks in advance. |
Macro to find end of column data
Sub ExtendFormulas()
Dim LastFRow As Long Dim LastGRow As Long LastFRow = Range("F65536").End(xlUp).Row LastGRow = Range("G65536").End(xlUp).Row Range("G" & LastGRow & ":G" & LastFRow).Formula = Range("G" & LastGRow).Formula End Sub On Thu, 09 Aug 2007 09:20:35 -0700, " wrote: I have a range of data (ex: A1:F20) and in the column (g) next to the data i have a formula that adds certain fields. I am constantly adding rows of data, so what I want is a macro that will find the last row of data in column F, then paste the formula from the last row of column G down to that row. Any help is appreciated. Thanks in advance. |
All times are GMT +1. The time now is 02:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com