+ Reply to Thread
Results 1 to 4 of 4

Autofill data once a selection is made from a dropdown box.

Hybrid View

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Autofill data once a selection is made from a dropdown box.

    I created a dropdown box and would like the all the data to fill in automatically based on which dropdown selection is picked. I need a little guidance on how to complete this task easily.

    Thanks!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Autofill data once a selection is made from a dropdown box.

    Hi and welcome to the forum

    Try this, copied down...
    =INDEX($A$1:$M$14,ROW(),MATCH($R$1,$A$1:$M$1,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Autofill data once a selection is made from a dropdown box.

    Thank you!! This forum is going to be a life saver, because the one thing I can not master in Excel are the forumulas!

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Autofill data once a selection is made from a dropdown box.

    Hi ggummo

    Try this Code in the Worksheet Module
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim cNo As Long
        If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
        If Target.Address = "$R$1" Then
            Application.EnableEvents = False
            Range(Cells(2, 18), Cells(2, 18).End(xlDown)).Clear
            cNo = ActiveSheet.Rows(1).Find(Range("R1").Value, LookAt:=xlWhole).Column
            Range(Cells(2, cNo), Cells(2, cNo).End(xlDown)).Copy
            Range("R2").PasteSpecial
            Application.CutCopyMode = False
            Application.EnableEvents = True
        End If
    End Sub
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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