Thread: Autopopulate
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Autopopulate

Hi

Here's a macro that will do it. This is an event code so it has to be copied
into the codesheet for sheet1.

Private Sub Worksheet_Change(ByVal Target As Range)
CopyFrom = "A10:D22" ' Change to suit
CopyTo = "A10:D22" ' Change to suit

If Target.Address = "$A$1" Then 'Change to suit
If Target.Value = "Event" Then
Worksheets("Sheet2").Range(CopyFrom).Copy _
Destionation:=Worksheets("Sheet1").Range(CopyTo)
End If
End If
End Sub

Regards,
Per

"cmulvey" skrev i meddelelsen
...
Hi. I have a 12row x 4column data set on sheet2. I would like to make it
so
that the user could type "Event" in a cell on sheet1 and it would
autopopulate with the 12x4 data. This would need to apply to every cell
on
sheet1 (or at least the majority of a single column). Is there a way to
accomplish this? The workbook will eventually be shared.
Thanks!