+ Reply to Thread
Results 1 to 3 of 3

Parse data table

  1. #1
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Parse data table

    I need to parse a large table of equipment and its various utilities consumed. Please see attached simplified file. I need help understanding how to add extra rows required, and how to loop through the utilities to only add those that are populated, ignoring those that aren't. I appreciate any advice. Thanks. David
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Parse data table

    Hi dgibney,

    This is a common problem. I call it wanting a better Excel table from a CrossTab table. See the attached where I've written a Macro to convert a Crosstab table to one that Excel will like better.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Re: Parse data table

    Thanks Marvin. This problem is "making me VERY ANGRY", to quote the other Marvin... Your solution is close to what I'm looking for but there are a few distinctions.... Please see my updated attachment. I need to have the Machines grouped and a row for each "Element" with the four columns (Input, Converted, Duty Factor and Average) in the same order as listed in the raw data. I am trying to write a script that would operate in these steps:
    1. For every Machine row the Element range cells are scanned to determine how many Element cells (clustered in 4 columns) are populated in each row. The sum of these populated cells (for one row) is divided by four to determine how many rows need to be inserted beneath each Machine listing. Since the first row can already contain one group of these 4 elements, one row would be subtracted from the total. So, in the example attached all three Airplane Elements groups are populated so 3-1 = 2 rows inserted under the first.
    2. The Machine title (only) auto-populates in each of these rows (Column A).
    3. The first group of (4) Elements are entered into a set of four columns in this first row. The Units (shaded in yellow) are entered as well in their own column.
    4. The second group of (4) Elements are entered into the second row, the third group to the 3rd row, etc., until it reaches the end of the Elements (last columns) found in the original row.
    5. This process repeats (loops) for the next Machine listed until all of the Machines have the correct number of rows added and Elements listed.

    If you have time to give this a shot I'd really appreciate it. Or if you can send me some advice as to how you would go about writing the script I will take my best shot. Either would be great. Thanks Marvin. David
    Attached Files Attached Files

+ 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. Normalizing historical data with a pivot table parse
    By portsample in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-06-2020, 01:59 AM
  2. parse data using VBA
    By twanbiz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-22-2012, 10:27 AM
  3. Parse data into new table?
    By JohnnyDavidson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2011, 08:58 PM
  4. Parse Data
    By chadwellp in forum Excel General
    Replies: 6
    Last Post: 02-13-2010, 01:45 AM
  5. Parse text file to provide specific table like format in excel
    By apunan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2009, 10:28 AM
  6. Parse HTML code, create a table
    By bg18461 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2008, 04:46 AM
  7. [SOLVED] How to parse data
    By bdwood in forum Excel General
    Replies: 1
    Last Post: 08-17-2006, 03:40 PM
  8. [SOLVED] RE: How to parse data
    By Dave F in forum Excel General
    Replies: 0
    Last Post: 08-17-2006, 02:35 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