+ Reply to Thread
Results 1 to 8 of 8

(VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups WS?

  1. #1
    Registered User
    Join Date
    11-05-2015
    Location
    San Diego, CA
    MS-Off Ver
    Professional Plus 2010
    Posts
    18

    Question (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups WS?

    Trying to write a VBA script for this, kind of confusing to explain, but here is the question:

    (Link to workbook)

    How do I group each list of Keywords into it's corresponding Group's worksheet, using VBA code?

    Approach tried: I tried using a dictionary object, but couldn't wrap my head around it nor get it to work. To me it seemed like a decent solution, but I don't really know where to start on this script.


    I have a list of Keywords in Column B, and each Keyword corresponds to a Group in Column A:

    bjfzpe.jpg



    Examples of Keywords corresponding to their respective Groups (worksheets), copied to Groups "Stainless Steel" and "Glass Dispenser":
    Note: Keywords will be copied into Column A for each respective Group (worksheet)

    Group (worksheet) "Stainless Steel":
    mhspah.jpg

    Group (worksheet) "Glass Dispenser":
    111qow4.jpg


    Any hints on where to start with the code / sample code suggestions? Any help would be greatly appreciated!
    Last edited by eryksd; 02-03-2016 at 11:46 PM.

  2. #2
    Registered User
    Join Date
    11-05-2015
    Location
    San Diego, CA
    MS-Off Ver
    Professional Plus 2010
    Posts
    18

    Re: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    No suggestions on where to start?

    Is using the dictionary object necessary for this task? Couldn't get that method to work, not sure...

  3. #3
    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: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    Hi eryksd

    Filtering would be one approach.

    Please attach a sample workbook the Structure of which is the same as your actual workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    INCLUDE ANY CODE YOU'RE USING OR HAVE TRIED.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.
    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.

  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: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    Hi eryksd

    Sorry, I didn't see your Link to Google Docs.

    I must be missing something here but try this.

    Insert this Code into a General Module. Assign it a Short Cut Key of CTRL + x (or add a Button).

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-05-2015
    Location
    San Diego, CA
    MS-Off Ver
    Professional Plus 2010
    Posts
    18

    Re: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    Quote Originally Posted by jaslake View Post
    Hi eryksd

    Sorry, I didn't see your Link to Google Docs.

    I must be missing something here but try this.

    Insert this Code into a General Module. Assign it a Short Cut Key of CTRL + x (or add a Button).

    Please Login or Register  to view this content.
    It works!!! Thank you John!

    That is some fancy code... trying to understand what's happening, ha
    Last edited by eryksd; 02-04-2016 at 10:37 PM.

  6. #6
    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: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    You're welcome...glad I could help. Thanks for the Rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    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: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    Hi eryksd

    Per your PM...

    Do you know how I can also transfer the corresponding Avg. Monthly Search Volume (Column "D") for each Keyword, into it's corresponding Group Worksheet?
    See if this works for you.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-05-2015
    Location
    San Diego, CA
    MS-Off Ver
    Professional Plus 2010
    Posts
    18

    Re: (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups

    Quote Originally Posted by jaslake View Post
    Hi eryksd

    Per your PM...



    See if this works for you.

    Please Login or Register  to view this content.
    Thank you John, worked perfectly!

    Didn't know you could use Union() like that, cool to see.

+ 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: 0
    Last Post: 10-21-2014, 03:20 PM
  2. [SOLVED] Move the content of specific groups of cells in column C to the first cell in that group
    By aviatecar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2014, 12:57 PM
  3. [SOLVED] Assign same value to selected cells within the same group
    By Ucpaul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2014, 11:41 PM
  4. Help!! Need to know how to assign characters for a group of cells
    By akay0402 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-02-2014, 05:07 AM
  5. Replies: 11
    Last Post: 03-13-2014, 08:23 PM
  6. Replies: 7
    Last Post: 10-19-2010, 06:32 AM
  7. Replies: 6
    Last Post: 06-03-2010, 04:25 AM

Tags for this Thread

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