+ Reply to Thread
Results 1 to 10 of 10

Data Transformation Required

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    12

    Data Transformation Required

    Hi All,

    Attached spreadsheet contains two tabs "Current" & "Required". "Current" contains the data that needs to be converted into the format present in "Required" Tab.

    I have a huge file, 127MB, with 0.2 million rows of such data & I really need help in getting the data transformed.

    Thank you.

    Kind Regards,
    theabdulrab.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Data Transformation Required

    I would use the "Text to Columns" option on your original data, using "|" as delimiter. and then in C2 of "Required":

    =MID(Current!B2,FIND("=",Current!B2)+1,256) and copy down and across.

    EDIT: Since the above will return both text and numbers as text, then this might be better:

    =IFERROR(MID(Current!B2,FIND("=",Current!B2)+1,256)*1,MID(Current!B2,FIND("=",Current!B2)+1,256))
    Last edited by Søren Larsen; 05-21-2012 at 06:10 AM.
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Data Transformation Required

    Hello Søren Larsen,

    Thank you for your reply.

    The column headers needs to be picked up within the data present in Cell B2 and B3 of "Current" tab & then the data should be populated as presented in "Required" tab. In other words, I don't have all the column headers listed and I will have to pick them up manually from the cell B2, B3 ........

    Thanks again for your help.

    Kind Regards,
    theabdulrab.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Data Transformation Required

    Try this in C2
    Please Login or Register  to view this content.
    or with 2007 and above
    Please Login or Register  to view this content.
    Drag Across then down as required.

    [EDIT]
    Better to replace FIND with SEARCH in the above formulae. Find() is case-sensitive, SEARCH() isn't.
    Attached Files Attached Files
    Last edited by Marcol; 05-21-2012 at 06:54 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Data Transformation Required

    Does Marcol's solution do the trick, or are you not there yet?

  6. #6
    Registered User
    Join Date
    05-10-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Data Transformation Required

    Hi,

    Thanks for your replies.

    I believe I am not clarifying my requirements clearly. So, I am giving it an other shot:

    The data that I currently have is present in the tab "Current". What I need to do is that I want to pick the value before "=" and make it as a column heading in the next tab. The value after the "=" should come under respective column heading. All column headings are delimited by "|".

    I manually wrote the column heading in "Required" tab just to give an idea and I want this done thru a macro or VBA code.

    One more thing is Cell B2 & B3 of "Current" tab contains different set of Column Headings, so, the tab "Required" should have a union of all the headings present in cell B2 & B3 of "Current" tab.

    Hope this clarifies my problem.

    Kind Regards,
    theabdulrab.

  7. #7
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Data Transformation Required

    Do you know how many headings you'll end up having?

  8. #8
    Registered User
    Join Date
    05-10-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Data Transformation Required

    Hi Stan,

    No, I don't.

    Kind Regards,
    theabdulrab.

  9. #9
    Registered User
    Join Date
    05-10-2012
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Data Transformation Required

    Hi Stan,

    It took me a while to get the number of headings. There are 1201 unique values that will become headings.

    Kind Regards,
    theabdulrab.

  10. #10
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Data Transformation Required

    Do you know how many headings you'll end up having?
    No, I don't.
    Hmmm?
    Try this in Sheet "Current" C2
    Please Login or Register  to view this content.
    Drag Down as required, then Across until all rows return blanks.

    This will extract all of the headers you will need, but there will be duplicates.

    You can then Copy and Paste Special > Values to a suitable location, transpose these rows to columns, transfer all that into a single column, remove duplicates, then transpose all of that into your header row, and then use the formula I gave you in post #4

    Personally I'd rather have broken bottles for breakfast!

    It took me a while to get the number of headings. There are 1201 unique values that will become headings.
    Seems a lot to me, however, you have them now ...

    See this workbook.
    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)

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