View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default Inputting data on one sheet and automatically updating other sheets

Yes. See the following code which should be put in the Master sheet's
code module. It assumes the last column you will enter data on the Master
sheet is column 3 and the city is in column A, so you will likely need to
change these to fit your data.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim aCity As String
Dim iRow As Long
If Target.Column = 3 Then
aCity = Cells(Target.Row, "A")
iRow = 1 + Worksheets(aCity).Range("A65536").End(xlUp).Row
Range("A" & Target.Row & ":C" & Target.Row).Copy _
Destination:=Worksheets(aCity).Range("A" & iRow)
End If

End Sub

HTH,
Merjet