Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FInd common data in one column then add number in adjacent column JT Excel Worksheet Functions 3 December 18th 09 10:20 PM
compare data in column A with column B to find duplicates George Excel Discussion (Misc queries) 8 February 6th 09 03:53 PM
Macro to find text string in a column and paste data in another nicolascap Excel Discussion (Misc queries) 8 March 14th 06 03:13 PM
Macro to find the first cell in a column with different data Lost in Alabama Excel Discussion (Misc queries) 2 December 14th 05 06:39 PM
Need Macro to Find Column Heading -- if none, then insert new column Jeff[_43_] Excel Programming 0 December 15th 04 07:08 AM


All times are GMT +1. The time now is 06:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"