+ Reply to Thread
Results 1 to 3 of 3

Worksheet Change to copy from a sheet based on values from data validation list

  1. #1
    Registered User
    Join Date
    10-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Worksheet Change to copy from a sheet based on values from data validation list

    Hello!

    I have some code that populates a range of cells with a range from another sheet based off what is chosen from a data validation list. I am running into a couple of issues when attempting to append to the existing data.

    Example:

    G4 has a data validation list and when someone chooses an item from that list cells H4:J30 get populated with values from cells B2:E30 from a corresponding sheet
    ie: I choose "Client Services" from the "Billing" sheet in cell G4. Information from the "Client Services" sheet gets populated into the "Billing" sheet.

    G5 also has a data validation list and when someone chooses an item from that list it REPLACES the values that are already populated from the G4 macro.


    Is there a way to have the values from the G5 item populate in the next available row?

    Here is what I have so far:

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Intersect(Range("G4:G30"), Target) Is Nothing Then Exit Sub

    Application.ScreenUpdating = False
    Worksheets("Billing Form").Range("H4:J30").Value = Sheets(Target.Value).Range("B2:E30").Value
    Application.ScreenUpdating = True

    End Sub

    Thanks!

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Worksheet Change to copy from a sheet based on values from data validation list

    It would be easier for someone to help you if you uploaded a sample workbook.

  3. #3
    Registered User
    Join Date
    10-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Worksheet Change to copy from a sheet based on values from data validation list

    Sorry having difficulty uploading.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1