+ Reply to Thread
Results 1 to 17 of 17

VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

  1. #1
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Question VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Folks,

    Please help me to extract data from one sheet to another sheet then transpose automatically.

    I have attached the work book of what I'm trying to accomplish.


    Thanks in advance for your expertise!
    Attached Files Attached Files
    Cheers,

    Joshi
    Being with a winner makes you a winner

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

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi joshi,

    Here is a Pivot Table (no vba needed) that comes close to what you want. See if it works for you.
    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
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Marvin,

    Thanks for your reply and advice. But unfortunately that will not suit for me, since I have to link the all data into another sheet for a conditional formatted Gantt chart and some reports.

    Hence can you please help me to fix the data as per my original data structure?

    Thanks,
    Joshi

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

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi,

    The data on Sheet1 is much better to work with. Trying to convert it to what you want on sheet 2 is a step backwards. What kind of CF Gantt chart do you want. I believe it you can make your charts from Sheet1 data so you don't need to convert to sheet 2....

    I get all kinds of question on how to convert data from your sheet2 form to sheet1 for, which is a much better TABLE format/style.

    I think you should work your data from sheet1 NOT from sheet2. I just can't help you make your problem harder and data worse...

    Sorry...

  5. #5
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Marvin,
    Thanks for your advice. Please someone help me to fix this. Please

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi

    I'll look at it...have some ideas...only guarantee, you'll get your money back if it doesn't work. Be back to you.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi

    It appears your Data is grouped by 7...is this ALWAYS the case?

    One Data Element, Gate.Tr-1&2, has 2 groups of 7 for a total of 14. Will there EVER be MORE than 2 groups of 7 for ANY Data Element?

  8. #8
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi John,

    Yes the Data is gouped by 7 always (G-1, G-2, CER, G-3, G-4, G-5 and G-6). And the group of 7 will be more than 2 groups and less than 11 for each Data Element.

    Thanks,

    Joshi

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi

    Try this Code in the attached
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi John,
    Awesome..!!!!! Your code is working excellent. Thank you so much.
    For a contingency, if the 7 group will come as a single for any data element (e.g. if Gate.Tr-1&2 has only G-1 then the G-1 start and finish dates should show in the table). Is this possible with minor code changes? If no, please ignore it since your existing code is more than enough for me.

    Thank you very much once again for your time and help.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi

    No, not a minor change...major change.

    I've not tested it but the logic of the Code will probably skip any that don't have a Group of 7.

  12. #12
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi John,
    Sorry for bothering you, today I have noticed an error in your code. Please see the attachment and kindly advise.

    Thanks
    Attached Files Attached Files

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi

    Since I have to revisit the Code tell me about this
    For a contingency, if the 7 group will come as a single for any data element (e.g. if Gate.Tr-1&2 has only G-1 then the G-1 start and finish dates should show in the table
    Let's assume a group has only a Single Element (or two, or three)...will that group ALWAYS contain a G-1 record? I'm looking for a Break Point...will a Group ALWAYS start with a G-1 record?

  14. #14
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Yes, a group will always start with G-1 record.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi Joshi

    These two issues have been addressed
    today I have noticed an error in your code
    and
    For a contingency, if the 7 group will come as a single for any data element (e.g. if Gate.Tr-1&2 has only G-1 then the G-1 start and finish dates should show in the table).
    Let me know of issues.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    Hi John,

    Thank you so much your code is working perfect..!!!. The Thread is SOLVED now.

    Thank you very much once again for your time and help.

  17. #17
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA / Macro / Formula help needed for extracting data and Transpose into another sheet

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. Macro to transpose data from one sheet to another
    By Cupragsw in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-26-2013, 12:17 PM
  2. [SOLVED] Macro to transpose vertical data horizontally from one sheet to another
    By Scott_88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2013, 06:27 AM
  3. [SOLVED] Need to Transpose and Flip Table of Data - Macro Probably Needed
    By BobTomlinson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2013, 09:25 AM
  4. [SOLVED] Manipulate and transpose data to another sheet via a Macro
    By Phil_MacRae in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-12-2012, 02:22 PM
  5. [SOLVED] VB code Macro needed to transpose data from columns to rows
    By raw_geek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-20-2012, 08:54 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