Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Autocopy formula to cells

I need a VB expert's help I think. I want formulas from several columns to
automatically copy down from the cells above, but only once data has been
input to another cell within the row. ie. once the cell A12 has data in then
the formulas from cells E11, F11, G11, H11, I11, J11 are copied into the
corresponding cells in row 12. Can anybody help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Autocopy formula to cells

Hi Marie,

Try to apply this Change event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Range("E" & Target.Row - 1 & ":J" & Target.Row - 1).AutoFill
Destination:=Range("E" & Target.Row - 1 & ":J" & Target.Row),
Type:=xlFillDefault
End If
End Sub

Post if you need help to install it!

Regards,
Stefi



€˛Marie Bayes€¯ ezt Ć*rta:

I need a VB expert's help I think. I want formulas from several columns to
automatically copy down from the cells above, but only once data has been
input to another cell within the row. ie. once the cell A12 has data in then
the formulas from cells E11, F11, G11, H11, I11, J11 are copied into the
corresponding cells in row 12. Can anybody help?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Autocopy formula to cells

You can use a worksheet_change event for this. right click sheet tabview
codeleft window select worksheetright window select change

something like

tr=target.row
if target.column<1 then exit sub
range(cells(tr-1,"e"),cells(tr-1,"j")).copy cells(tr,"e")

--
Don Guillett
SalesAid Software

"Marie Bayes" wrote in message
...
I need a VB expert's help I think. I want formulas from several columns to
automatically copy down from the cells above, but only once data has been
input to another cell within the row. ie. once the cell A12 has data in
then
the formulas from cells E11, F11, G11, H11, I11, J11 are copied into the
corresponding cells in row 12. Can anybody help?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Autocopy formula to cells

Hi Don

That's almost what I require only it's now copying the contents of the cells
above and not just the formula. Is it possible just to copy the formula?

"Don Guillett" wrote:

You can use a worksheet_change event for this. right click sheet tabview
codeleft window select worksheetright window select change

something like

tr=target.row
if target.column<1 then exit sub
range(cells(tr-1,"e"),cells(tr-1,"j")).copy cells(tr,"e")

--
Don Guillett
SalesAid Software

"Marie Bayes" wrote in message
...
I need a VB expert's help I think. I want formulas from several columns to
automatically copy down from the cells above, but only once data has been
input to another cell within the row. ie. once the cell A12 has data in
then
the formulas from cells E11, F11, G11, H11, I11, J11 are copied into the
corresponding cells in row 12. Can anybody help?




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
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
quick way to copy-paste a formula linked to cells in another file iniakupake Excel Worksheet Functions 2 September 26th 05 03:56 AM
Formula works in some cells, doesn't in other Wowbagger New Users to Excel 13 June 30th 05 03:21 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM
Applying formula to only NON-EMPTY cells in range Tasi Excel Discussion (Misc queries) 5 March 29th 05 10:48 PM


All times are GMT +1. The time now is 03: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"