+ Reply to Thread
Results 1 to 3 of 3

Inserting values based upon a drop down box selection

  1. #1
    Registered User
    Join Date
    02-11-2015
    Location
    Lismore, Australia
    MS-Off Ver
    2007
    Posts
    3

    Inserting values based upon a drop down box selection

    Hi all, just after some help thanks. I've got a spreadsheet with a drop down box which has 5 variables. Depending upon the selection made (cell C2), I want it to insert corresponding values into cells F6:F12 from columns K6:012. I've tried using some IF functions but it gets too messy and doesnt work properly. Maybe I should be using a named range or similar but thats a bit out of my skill level. See attached spreadsheet for more details. Basically if C2 is set to Conservative then I would like to insert K6:K12 into F6:F12. or if C2 is set to Aggressive then I would like to insert the values from O6:O12 into F6:F12. Hope that makes sense and thanks in advance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-08-2010
    Location
    Montenegro
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Inserting values based upon a drop down box selection

    HLOOKUP is your friend; see attachment.

    You will see row argument ROW()-3; basically, this defines which row from K6:012 is "the chosen one"; so, for cell F6 it's 3 (first row is caption, "Conservative", second row is empty, and third row is 10%, which you want to pick up), for cell F7 it's 4, and so on; but rather than changing it in each row, I connected it to row number, so you can simply copy the formula down. This will work as long as source and destination are in the same order like in this example; if you change it, you will need to adjust that.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-11-2015
    Location
    Lismore, Australia
    MS-Off Ver
    2007
    Posts
    3

    Re: Inserting values based upon a drop down box selection

    That is awesome and works perfectly. Thank you very much and greatly appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 06-03-2013, 06:30 AM
  2. Replies: 3
    Last Post: 03-10-2013, 12:56 PM
  3. Pulling values based on selection from drop down box
    By twarrix in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-24-2012, 11:14 AM
  4. Changing values based on drop down menu selection
    By henro8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2010, 03:47 AM
  5. change cell values based on drop down box selection
    By Aniruddha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2006, 05:30 PM

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