+ Reply to Thread
Results 1 to 8 of 8

change validation list value and copy and paste from dependent cells

  1. #1
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    change validation list value and copy and paste from dependent cells

    Hi all,

    This is quite hard to explain please see the attached workbook.

    I have a sheet which autofilters according to a validation list in cell E2 using the code:

    Please Login or Register  to view this content.
    I have then used subtotal arrays to calculate the mean, median, max, min and total count for whichever values the filter shows.

    What I want to do next is have a code which will select each possible option from the validation list (triggering the autofilter) and copy and paste the values from each dependent formula into a new sheet.

    Any help would be greatly appreciated.

    Many Thanks,
    J.farr3lldummy 1.xlsm
    Last edited by j.farr3ll; 06-13-2014 at 06:30 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: change validation list value and copy and paste from dependent cells

    hi j.farr3ll, option without using formulas, press "Run" button
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: change validation list value and copy and paste from dependent cells

    hi there,

    thanks for this, works great on the dummy sheet. I'm struggling to move it across to my main workbook though.

    The code breaks at the following line:

    Please Login or Register  to view this content.
    with a run-time error '9' Subscript out of range.

    What is the vl?

    Thanks,
    James

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: change validation list value and copy and paste from dependent cells

    vl is a cell from validation list range. I've updated the code with sheet reference for the code to run correctly either from button or code start from anywhere. Try it if that helps.

    If it does not help can you post a real world workbook stripped of any confidential data if any?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: change validation list value and copy and paste from dependent cells

    Hi Watersev,

    This still isn't working... stripping out the confidential data might not be an option it's a pretty big workbook. The only differences between this and dummy is that the data in range a11:B28 (dummy) is in B5:C1071, the validation list is in A5:A129 and the sheets are called "Summary2" and "trust Summary".

    I've tried to adapt the code as follows: Can you see anywhere obvious where I've gone wrong?

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: change validation list value and copy and paste from dependent cells

    hi James, what's the problem to make a mock up file with a list and data table of the same layout?

    Please check attachment, I've deleted validation range search, the code just takes values from A5 and down till empty cell
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: change validation list value and copy and paste from dependent cells

    optimized code for large data set in B:C, please check attachment
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: change validation list value and copy and paste from dependent cells

    that's great. Thanks for your help and patience

+ 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. Help on paste over data validation list cells
    By kumari in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2013, 05:44 AM
  2. Validation list (dependent on the result of the preceding list) + Concatenate
    By Elainefish in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-08-2013, 09:19 AM
  3. Data Validation List - Dependent on Adjacent Cell - Value from Unsorted List
    By justforthis1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-26-2013, 12:24 PM
  4. Replies: 1
    Last Post: 10-29-2012, 10:03 AM
  5. Validation List to copy and paste in specific area (excel 2007)
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-24-2012, 02:22 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