+ Reply to Thread
Results 1 to 8 of 8

Copy Data based on selection in drop down control

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy Data based on selection in drop down control

    I'm trying to copy data from one sheet to another sheet automatically based on a number selected in a drop down control.

    I have used OFFSET to pull some information successfully from a list. This is easy for me to do with single entries and a list and has worked well. I want to do similar but with a dataset not just single cells.

    But, I can't seem to make OFFSET work to show a set of data easily.

    Perhaps I will need VB code to do so? Or there is another control I'm not aware of? I've done very little with VB.

    I'll attach a sample file to try to show better what I'm trying to do.


    Thanks for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Copy Data based on selection in drop down control

    I named all the ranges on the Data sheet using Table and the number assigned to the range of data. I entered the word "Table" in Data!A1.

    I then selected the range L6:O22 and entered this array formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the attachment to see how it works.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Copy Data based on selection in drop down control

    hope this works for you

    sample (3).xlsx

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Copy Data based on selection in drop down control

    hey, newdoverman, that's cool, a lot more efficient than my method - i will use that a ton in the future

    you could just do =INDIRECT("table"&J5) instead, so you don't need the word Table in Data!A1

    smssms, still take a look at mine, i set it up so you don't need the 2 in cell A21 or the awkward looking dropdown linked to A1, just use a data validation cell in J4 or actually you could put it in the cells above Result, Result 2, Result 3, Summary Data so you don't need a cell in the J column, just to make is a bit nicer

    PS my method you don't need named ranges if you have tons of part numbers you will have tons of ranges to name
    Last edited by scott.s.fower; 04-25-2013 at 03:30 PM.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Copy Data based on selection in drop down control

    I agree that Data Validation is the way to go. I took a look at your example and also agree with you about A21 and J4.

    I did try the =INDIRECT("Table"&J5) but I must have been making a typo because I kept getting an error. In the end, I resorted to Data!A1 with Table entered in the cell.

    This sample is a combination (done quickly) combining both of our ideas....I think.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy Data based on selection in drop down control

    Thank you both for your help! THis helps a lot! I had the thought of going the data validation route after stepping away from the data for a few hours. I appreciate your help, these skills will be very helpful for me!

  7. #7
    Registered User
    Join Date
    04-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy Data based on selection in drop down control

    I have tried to play with these functions. When I use INDIRECT I am always getting #VALUE error. I've tried with writing in the cell and without. Am I missing something? I've never worked with INDIRECT before.

    Can I type INDIRECT in one cell at a time or do I need to create an array somehow then paste it in?

    I'm still trying to make the long formula from Scott work as well without error. Taking some time :-)

  8. #8
    Registered User
    Join Date
    04-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy Data based on selection in drop down control

    I figured it out and it's working! Thank you so much!!

+ 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