+ Reply to Thread
Results 1 to 10 of 10

Please help in Reformatting data in Excel

  1. #1
    Registered User
    Join Date
    04-23-2014
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    27

    Please help in Reformatting data in Excel

    Hi,

    Can you please suggest how to reformat the data?
    Sample input canbe found in Sample input.xlsx
    This is only sample data. Only 2 rows are displayed. In the actual file, I have around 30,000 rows to be reformatted.

    Expected output sample can be found in Expected Output.xlsx

    Can you please help?

    Regards,
    Pal.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Please help in Reformatting data in Excel

    Not sure if I can manage it, but I will try something.

    What is the maximum number of years one row can have? In your example you have 7 years for row 2, can there be more?

  3. #3
    Registered User
    Join Date
    04-23-2014
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Please help in Reformatting data in Excel

    Thanks for replying.
    Yes, it could be more. Number of years in the second column vary from 1 to 54.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Please help in Reformatting data in Excel

    Try this to see if you get the desired output....
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Please help in Reformatting data in Excel

    In that case, any approach I can produce wouldn't work, simply because of the huge amount of data, sorry.

  6. #6
    Registered User
    Join Date
    04-23-2014
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Please help in Reformatting data in Excel

    Hi,

    It worked fine for partial inputs. Thanks a ton for the help.

    In case, if the | separated values are present in column 'E', how to modify the macro? Can you please let me know?
    I tried replacing 'D' with 'E' in the code. But it didn't work.

    Regards,
    Pal

  7. #7
    Registered User
    Join Date
    04-22-2013
    Location
    Philippines & Australia
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    73

    Re: Please help in Reformatting data in Excel

    Good Day mate, I have attached your example Input sheet and presented code to manipulate the data as you requested This example transfers the data to Sheet2 on the same workbook, It should work for your larger DataFile with just a little tweaking. ie naming Column A and Column E as suggested and inserting the Formula To calculate the Number of Rows of Data you Have. The macro inserts another Formula in the sheet in the Column E. If you need help saving the Data to another workbook just holla!
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Please help in Reformatting data in Excel

    Another:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-22-2013
    Location
    Philippines & Australia
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    73

    Re: Please help in Reformatting data in Excel

    Slight rewrite of Macro included in "Sample_Input"
    Instead of placing a formula in every cell in Column E
    It Only does so in cells adjacent Data

    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Please help in Reformatting data in Excel

    Hi -

    Here is another solution.
    Please Login or Register  to view this content.
    event

+ 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] Reformatting Raw Data
    By snuffnchess in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2015, 02:53 PM
  2. Reformatting Raw Data
    By stinkyd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-15-2013, 11:28 PM
  3. Excel reformatting formulas when data is entered
    By Heather B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-13-2013, 03:00 PM
  4. Replies: 2
    Last Post: 11-20-2012, 11:14 PM
  5. Reformatting data
    By Jchhoule in forum Excel General
    Replies: 5
    Last Post: 05-22-2012, 12:22 PM
  6. Reformatting data labels for Excel pie charts
    By krabople in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-26-2009, 09:38 AM
  7. how to prevent Excel from reformatting a chart wen updating data?
    By Cmd_Marco in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-10-2006, 10:55 AM

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