+ Reply to Thread
Results 1 to 7 of 7

Macro to convert a Flat Data with many Headings to a Database with few Headings

  1. #1
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Macro to convert a Flat Data with many Headings to a Database with few Headings

    Hello All Experts,

    I have cross tabular data as shown in the Before Sheet

    I want a macro to convert it to a database as shown on After Sheet

    There is only one sheet in the Workbook. The macro should create the After Sheet

    Last row of the data should be excluded

    Headings start from A1 till across

    Data starts from A2 till down

    Headings with numbers in parentheses should be splitted into two Columns viz DT & CC

    Col L to S should be transposed against the each Name

    Col U to AA should be transposed against each Name

    Columns T, AB & AC to be ignored

    After sheet shows only Name1 for explanation purpose

    The macro should run for all Names

    Any help would be greatly appreciated

    Thanks in advance

    Rehana
    Attached Files Attached Files
    Last edited by rehana402003; 11-10-2017 at 06:51 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro to convert a Flat Data with many Headings to a Database with few Headings

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Re: Macro to convert a Flat Data with many Headings to a Database with few Headings

    Dear Jindon,
    Thanks for the code. Works fantastic.
    Few tweaks required please
    1) If the Headings are two words eg BS SA (2223333), HO DE (1112222). The it splits as BS and HO. Not as BS SA and HO DE.
    .

    2) Also if you could add one More Heading GT (Col P) in the last which would be difference of Col N - Col O.

    Thanks once again for your time and help

    Regards

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro to convert a Flat Data with many Headings to a Database with few Headings

    Upload a workbook with before/after, clearly showing the logic behind it.

  5. #5
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Re: Macro to convert a Flat Data with many Headings to a Database with few Headings

    Dear Jindon,
    Please see the new sample

    Thanks a lot
    Regards
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro to convert a Flat Data with many Headings to a Database with few Headings

    See if this is how you wanted.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Re: Macro to convert a Flat Data with many Headings to a Database with few Headings

    Yes exactly.
    Thanks a lot for all your time and help

    Regards
    Rehana

+ 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] Macro to Unpivot a Flat Data with Merged headings
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2017, 11:27 AM
  2. How to make a Templates column headings dynamic with the Pivot table headings
    By DashBD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2017, 05:20 PM
  3. Replies: 2
    Last Post: 06-15-2015, 05:16 PM
  4. Convert Column headings and values into Row data
    By cjexpat in forum Excel General
    Replies: 2
    Last Post: 12-14-2014, 12:18 PM
  5. Create macro to copy data using column headings
    By zkhan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2013, 02:01 AM
  6. [SOLVED] Macro to clear all data from worksheets except the headings
    By robertguy in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-19-2012, 11:27 AM
  7. [SOLVED] Can I invert a table so row headings are now column headings etc
    By Sharon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2005, 04:06 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