View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim G Jim G is offline
external usenet poster
 
Posts: 132
Default Insert formulas on data entry trigger

Thank you Bernie.

This worked exactly as I wanted. Nice adn simple, I even learned a thing or
two to use next time.

Cheers
--
Jim


"Bernie Deitrick" wrote:

Jim,

Copy the code below, right-click the sheet tab, select "View Code" and paste
in the window that appears.

Bernie

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Target.Column < 4 Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row + 1, 1).Select
Range("E5:L5").Copy Target.Offset(0, 1).Resize(1, 8)
Application.EnableEvents = True
End Sub

"Jim G" wrote in message
...
I have a data sheet template that has measurements entered into columns A
(Item), B (Width), C (Height) and D (Quantity).

Columns E to L have formulas.

Data starts on Row 6. If I enter the formulas into a hidden row (5), how
can
I have the formulas copied from E5:L5 into E6:L6 when the quantity is
entered
into column D and the cursor moved to column A of the next row to start
the
next data entry and so on.

Data will vary from a few rows to dozens of rows.

Does anyone have a suggestion for a macro based on a selection change in
column D from row 6 onward?
--
Jim