+ Reply to Thread
Results 1 to 4 of 4

Automating table transformations

  1. #1
    Registered User
    Join Date
    10-19-2016
    Location
    London
    MS-Off Ver
    7
    Posts
    14

    Automating table transformations

    I have two tables that I want to combine.
    rating.jpg

    The expansion of the table should look like this by the end (this is a cut off version as it's quite large)
    Untitled.jpg

    My idea is to loop through the blue range. On each cell I want to record the corresponding values for the variables Meal, Course, Fruit, Letter, and Pies. Then it would be a case of writing the table one line at a time as they are recorded. Since I have two ranges of the same structure I guess I'd have to do it twice.

    I'm fairly new to programming so I'm not really sure how to get started with this.

    I have written the first bit which unmerges the cells and fills in them with the corresponding values. Like so
    Please Login or Register  to view this content.
    Untitled2.jpg

    The next stage would be to copy any column with a "/" in to the end of the table. Finally I need to loop through the values of the range recording the corresponding values that I need.

    Any help getting started would be greatly appreciated.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by mountainm; 04-13-2017 at 08:33 AM. Reason: additional data added

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Automating table transformations

    Posting that sample workbook would help, and this definitely is doable. Per the Forum's tips for getting a quick answer:

    Post a WORKBOOK. Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    10-19-2016
    Location
    London
    MS-Off Ver
    7
    Posts
    14

    Re: Automating table transformations

    data is attached now

  4. #4
    Registered User
    Join Date
    10-19-2016
    Location
    London
    MS-Off Ver
    7
    Posts
    14

    Re: Automating table transformations

    I have made a start but I'm not sure where I am going wrong. I have changed the data so it makes more sense. see attached data spreadsheet. I thought making a function that returns a variant would be the way to go. Here is my main piece of code and the function is listed beneath

    Please Login or Register  to view this content.

    How do I get it to print the variant each time it retrieves all the values?

    Thanks

+ 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. Automating Pivot table and pivot chart creation if data table names unknown
    By Vegiepie2016 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-04-2016, 11:52 AM
  2. Automating Table Data Mining
    By student1976 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2011, 04:43 PM
  3. Automating input for table
    By FortuneSyn in forum Excel General
    Replies: 2
    Last Post: 01-29-2010, 02:44 PM
  4. Automating Table
    By jonnygrim in forum Excel General
    Replies: 0
    Last Post: 07-23-2008, 05:50 PM
  5. 2D Transformations in Excel
    By krypton_ls in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-09-2007, 06:17 AM
  6. [SOLVED] Automating a Pivot Table
    By Droidy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2006, 08:55 PM
  7. [SOLVED] automating a pivot table
    By bobf in forum Excel General
    Replies: 1
    Last Post: 01-21-2005, 06:06 PM

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