+ Reply to Thread
Results 1 to 4 of 4

Using scripting dictionary to add contiguous group of items from non contiguous range

  1. #1
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Using scripting dictionary to add contiguous group of items from non contiguous range

    This one has me stumped.

    See attached workbook:
    Using a dictionary I would like to copy the values in Sheet1 column C to Sheet 2 column A based upon the contiguous groups of strings in Sheet1 column A. I.E. Sheet1 C1 will be copied to Sheet2 A1, Sheet1 C7:C9 will be transposed to Sheet2 A2:C2, etc. (See sheet2 for results)

    Note: I know many other ways of doing this, I am specifically looking to see if this is possible using a dictionary.

    Code I have so far
    Please Login or Register  to view this content.
    If you need any other information please let me know. Thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Using scripting dictionary to add contiguous group of items from non contiguous range

    Try this version to see if it gets the result you're looking for:
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Using scripting dictionary to add contiguous group of items from non contiguous range

    I find post#1 somewhat puzzling.
    As noted, there's various ways to produce the result.
    There's also various ways to use one or more of the properties of the dictionary object.
    All of the things a dictionary can do can be done in other ways. Dictionary is often more convenient and sometimes faster. It's neither of these in the example you give.
    There's a code below including a dictionary but making no use of it because its unclear which of its properties are important to you. If you'd like to be more specific about which dictionary properties you want there should be little problem in including them, but for what purpose?
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Using scripting dictionary to add contiguous group of items from non contiguous range

    Thank you WHER. Exactly what I was looking for.

+ 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. [SOLVED] How to sum non-contiguous columns applied as a formula on contiguous cells
    By figo12 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2013, 01:07 PM
  2. [SOLVED] How to delete multiple contiguous (and/or) non-contiguous rows, in an excel table
    By jimmalk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2012, 05:48 AM
  3. [SOLVED] Creating a contiguous list from a non contiguous list of items
    By tonymq in forum Excel General
    Replies: 6
    Last Post: 11-26-2012, 09:33 AM
  4. [SOLVED] Scripting Dictionary add additional items
    By thisisgerald in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-15-2012, 07:32 AM
  5. Copy and Paste an array (contiguous & non contiguous ranges)
    By Xrull in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-09-2010, 09:17 AM

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