+ Reply to Thread
Results 1 to 4 of 4

Normalizing data (removing row subheadings)

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Normalizing data (removing row subheadings)

    Hello forum

    I'm new here, but haven't been able to find anything on this subject. I'm very new to VBA, however I'm pretty sure that it can handle my request, but cannot figure out how.

    I have a table looking like the one in pic1.PNG. It carries on like that in 698 rows (including blanks), but might be larger (or smaller) than that in the future. There is no firm number of variants per product name and no firm number of product names per product group.

    I would like to excel-normalize it to the format shown in pic2.PNG, eventually with the dimension-colum by itself (then'll concatenate myself)

    Thanks alot - appreciate any input!

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Normalizing data (removing row subheadings)

    opadbakke,

    Welcome to the Excel forum.

    You are posting a picture(s)/graphic(s). This means that if this was a problem where one needed to use your data, anyone trying to help you would have to enter the data manually. That makes no sense and I doubt that you would get any answer.

    To get the most precise answer, it is best to upload/attach a sample workbook (sensitive data scrubbed/removed/changed) that contains an example of your raw data on one worksheet, and on another worksheet your desired results.

    The structure and data types of the sample workbook must exactly duplicate the real workbook. Include a clear and explicit explanation of your requirements.

    To attach your workbook, scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Normalizing data (removing row subheadings)

    Stan ,

    I just needed some hints on structure and perhaps some hints on which objects/methods to use - not the entire solution itself (then'll never learn it, right?). But I see your point - the example workbook is here: example.xlsx (if I got the attachment procedure right)

    But to explain it : I have a price list i the PriceList-sheet. I need the data in the price list in the format shown in the DataExtract-sheet.

    Thanks!

    /opdadbakke

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Normalizing data (removing row subheadings)

    opadbakke,

    Thanks for the workbook.

    With your raw data in worksheet Price List, the results will be displayed in worksheet DataExtract.

    Detach/open workbook ReorgData w1 Areas sr er wD nr - opadbakke - EF858678 - SDG15.xlsm and run the ReorgData macro.


    If you want to use the macro on another workbook:


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
    2. Open your workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


    Please Login or Register  to view this content.

    Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm


    Then run the ReorgData macro.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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