Inputting data on one sheet and automatically updating other sheets

  • Thread starter Thread starter tricxster
  • Start date Start date
T

tricxster

I have a spreadsheet that contains information for different shippin
locations. I have a master sheet where all information is loaded and
have tabs for each of our shipping locations. Currently I input th
data on the master tab then I cut and paste the info to a tab in th
same spreadsheet based on which location it went to. Is there a way t
have the information I input on the master sheet automatically inpu
the same data on the location sheet for the destination? Say I input
shipment on the master sheet going to Dallas, I would like the info o
the master to automatically show up on the Dallas tab without me havin
to cut and paste it there. Thanks for any help you might provide

Attachment filename: tracking new.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=62929
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top