ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   automatic fill formulas down (https://www.excelbanter.com/excel-worksheet-functions/139555-automatic-fill-formulas-down.html)

Dreamstar_1961

automatic fill formulas down
 
Is it possible to have a formula to feed down automaticly, as I don't know
how many entry's there will be, and having mutible formulas on every line,
I'm looking for a way that I can put a formula in and when the data is
entered into the first column , the formuia will move to the next line.

Susan

automatic fill formulas down
 
i don't know of a formula way.........
i know a couple of other ways.......

1. enter the formula down the column as far down as you need & set
conditional formatting to make the text white if the first column on
that row is empty. then you won't SEE all the formulas sitting
there. the trouble with this method is it will make your page(s)
automatically as long as you dragged down........... so even if you
only have entries in column A to row 10, if you've dragged the white-
text-formula down to row 100, that's what your used range will be for
printing pages - not a problem but you've got to manually change the
page range, thn.

2. set up a worksheet_change macro that everytime a cell in column A
is changed/info entered, the appropriate formula is entered into the
other column. harder to do but will make your life (potentially)
easier.

if you want help with #2, let me know.
hope this helps!
susan




On Apr 19, 6:54 am, Dreamstar_1961
wrote:
Is it possible to have a formula to feed down automaticly, as I don't know
how many entry's there will be, and having mutible formulas on every line,
I'm looking for a way that I can put a formula in and when the data is
entered into the first column , the formuia will move to the next line.




Susan

automatic fill formulas down
 
pardon me if this is a duplicate - not sure if 1st went thru.........
here is code for suggestion #2. it goes in a WORKSHEET module for
whichever worksheet you want it to work in:

Option Explicit

Private Sub worksheet_change(ByVal Target As Range)

Dim ws As Worksheet
Dim rTarget As Range
Dim sFormula As String
Dim lRow As Long

lRow = ActiveCell.Row
Set ws = ActiveSheet
Set Target = ws.Range("a" & lRow)
Set rTarget = ws.Range("d" & lRow)
sFormula = "=b" & lRow & "+c" & lRow

Application.EnableEvents = False
'if you don't turn off EnableEvents, every time
'it changes rTarget, it sees that as a worksheet_
'change, & it keeps looping endlessly!

If Target = "" Then
Application.EnableEvents = True
Exit Sub
Else
rTarget = sFormula
End If

Application.EnableEvents = True

End Sub


:)
susan

On Apr 19, 8:22 am, Susan wrote:
i don't know of a formula way.........
i know a couple of other ways.......

1. enter the formula down the column as far down as you need & set
conditional formatting to make the text white if the first column on
that row is empty. then you won't SEE all the formulas sitting
there. the trouble with this method is it will make your page(s)
automatically as long as you dragged down........... so even if you
only have entries in column A to row 10, if you've dragged the white-
text-formula down to row 100, that's what your used range will be for
printing pages - not a problem but you've got to manually change the
page range, thn.

2. set up a worksheet_change macro that everytime a cell in column A
is changed/info entered, the appropriate formula is entered into the
other column. harder to do but will make your life (potentially)
easier.

if you want help with #2, let me know.
hope this helps!
susan

On Apr 19, 6:54 am, Dreamstar_1961



wrote:
Is it possible to have a formula to feed down automaticly, as I don't know
how many entry's there will be, and having mutible formulas on every line,
I'm looking for a way that I can put a formula in and when the data is
entered into the first column , the formuia will move to the next line.- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 12:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com