Autofilling down a column?

A

alann2

ok, here is the situation. I am trying to create an attendee feedback
sheet on a monthly basis. on the feedback input sheet, I have trainer
name, course name, dates, numbers attended etc.
on another sheet in the same workbook I have already set up a table
that needs populated.
I would like to be able to put the course name in the first sheet say
cell B7 from a dropdown list I have already created. and that would
fill in a cell on the second sheet in course name column. however, I do
not want the data to go into one cell on the second sheet.I would like
the date somehow to see that if a cell is full then it moves down one
cell to put the information in there.

I am using winxp pro with excel 2003. If I need to make this clearfer
then please ask, any help would be greatly, and I mean greatly
appreciated.

kind regards

Alan.
 
O

Otto Moehrbach

Alan
There are several scenarios that would fit what you say so I'm making an
assumption that you want the value from B7 of the first sheet to go into the
cell immediately below the last occupied cell in Column A of the second
sheet. Also, the second sheet is named "Two". You need VBA to do what you
want. The following macro will do that. Note that this macro is a
worksheet macro and must be placed in the sheet module of the first sheet.
To access that module, right-click on the sheet tab, select View Code, and
paste this macro into that module. "X" out of the module to return to your
sheet.
Note that this macro is triggered by any change to the contents of any cell
in the sheet. However, the macro will do nothing unless the cell that
changed is B7. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Target.Address(0, 0) = "B7" Then
Sheets("Two").Range("A" & Rows.Count). _
End(xlUp).Offset(1).Value = Target.Value
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True
End If
End Sub
 
Top