PC Review


Reply
Thread Tools Rate Thread

Copy Fomulas down

 
 
Ronbo
Guest
Posts: n/a
 
      28th Jun 2008
I have data in columns A:E and corresponding formulas in F:G. Data is added
to columns A:E and I am trying to create a formula that will find the last
formula(s) in columns F:G and copy it down to the end of the data.

I have found numours ways to do this using a static reference in F & G, but
I have to use the last formula in the column to copy down.

Any help is appreciated.

Ronbo
 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      28th Jun 2008
hi
formulas return values, they cannot perform actions like copy and paste. you
will have to do this manuallly or via macro.

Regards
FSt1

"Ronbo" wrote:

> I have data in columns A:E and corresponding formulas in F:G. Data is added
> to columns A:E and I am trying to create a formula that will find the last
> formula(s) in columns F:G and copy it down to the end of the data.
>
> I have found numours ways to do this using a static reference in F & G, but
> I have to use the last formula in the column to copy down.
>
> Any help is appreciated.
>
> Ronbo

 
Reply With Quote
 
Ronbo
Guest
Posts: n/a
 
      28th Jun 2008
P.S. I am trying to create a routine/macro, not a formula.

"Ronbo" wrote:

> I have data in columns A:E and corresponding formulas in F:G. Data is added
> to columns A:E and I am trying to create a formula that will find the last
> formula(s) in columns F:G and copy it down to the end of the data.
>
> I have found numours ways to do this using a static reference in F & G, but
> I have to use the last formula in the column to copy down.
>
> Any help is appreciated.
>
> Ronbo

 
Reply With Quote
 
Joel
Guest
Posts: n/a
 
      28th Jun 2008
Sub copyformulas()

LastRow = Range("A" & Rows.Count).End(xlUp).Row
LastRowF = 0
LastRowG = 0
For RowCount = 1 To LastRow

If Left(Range("F" & RowCount).Formula, 1) = "=" Then
LastRowF = RowCount
End If
If Left(Range("G" & RowCount).Formula, 1) = "=" Then
LastRowG = RowCount
End If

Next RowCount

Range("F" & LastRowF).Copy _
Destination:=Range("F" & (LastRowF + 1) & ":F" & _
LastRow)
Range("G" & LastRowG).Copy _
Destination:=Range("G" & (LastRowG + 1) & ":G" & _
LastRow)
End Sub

"Ronbo" wrote:

> I have data in columns A:E and corresponding formulas in F:G. Data is added
> to columns A:E and I am trying to create a formula that will find the last
> formula(s) in columns F:G and copy it down to the end of the data.
>
> I have found numours ways to do this using a static reference in F & G, but
> I have to use the last formula in the column to copy down.
>
> Any help is appreciated.
>
> Ronbo

 
Reply With Quote
 
Ronbo
Guest
Posts: n/a
 
      28th Jun 2008
Perfect! Thanks a lot.

"Joel" wrote:

> Sub copyformulas()
>
> LastRow = Range("A" & Rows.Count).End(xlUp).Row
> LastRowF = 0
> LastRowG = 0
> For RowCount = 1 To LastRow
>
> If Left(Range("F" & RowCount).Formula, 1) = "=" Then
> LastRowF = RowCount
> End If
> If Left(Range("G" & RowCount).Formula, 1) = "=" Then
> LastRowG = RowCount
> End If
>
> Next RowCount
>
> Range("F" & LastRowF).Copy _
> Destination:=Range("F" & (LastRowF + 1) & ":F" & _
> LastRow)
> Range("G" & LastRowG).Copy _
> Destination:=Range("G" & (LastRowG + 1) & ":G" & _
> LastRow)
> End Sub
>
> "Ronbo" wrote:
>
> > I have data in columns A:E and corresponding formulas in F:G. Data is added
> > to columns A:E and I am trying to create a formula that will find the last
> > formula(s) in columns F:G and copy it down to the end of the data.
> >
> > I have found numours ways to do this using a static reference in F & G, but
> > I have to use the last formula in the column to copy down.
> >
> > Any help is appreciated.
> >
> > Ronbo

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      28th Jun 2008
Sub Auto_Fill()
Dim Elastrow As Long
Dim Flastrow As Long
With ActiveSheet
Flastrow = Range("F" & Rows.Count).End(xlUp).Row
Elastrow = Range("E" & Rows.Count).End(xlUp).Row
Range("F" & Flastrow & ":G" & Elastrow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP

On Sat, 28 Jun 2008 10:08:00 -0700, Ronbo <(E-Mail Removed)>
wrote:

>I have data in columns A:E and corresponding formulas in F:G. Data is added
>to columns A:E and I am trying to create a formula that will find the last
>formula(s) in columns F:G and copy it down to the end of the data.
>
>I have found numours ways to do this using a static reference in F & G, but
>I have to use the last formula in the column to copy down.
>
>Any help is appreciated.
>
>Ronbo


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking Fomulas Rahn Microsoft Excel New Users 2 13th Apr 2010 07:49 PM
fomulas; copy formulas but only changing sheet Don Franco Microsoft Excel Discussion 3 30th May 2007 12:50 PM
Saving Fomulas only =?Utf-8?B?VE1M?= Microsoft Excel Misc 2 12th May 2004 01:53 AM
fomulas, 0 values =?Utf-8?B?aG9sdHNmb3Jk?= Microsoft Excel Misc 1 19th Feb 2004 04:13 AM
fomulas Gina Microsoft Excel Worksheet Functions 1 20th Nov 2003 01:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:16 AM.