+ Reply to Thread
Results 1 to 8 of 8

Macro for extract data into new sheet

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    India,Pune
    MS-Off Ver
    Excel 2013
    Posts
    99

    Macro for extract data into new sheet

    Hi,

    I need a macro which is extract data from attached sheet into new sheet with below format -

    Column A - Account Name (From the column A in attached sheet)
    Column B - Project Name (From the column B in attached sheet)
    Column C - Put the name of resources ( From the column C in attached sheet). Need only resources who charged billable hours in column "G" in attached sheet.
    Column D - Include Billable hours. ( From the column G in attached sheet)

    I have included only few projects in attached sheet but I have lot of project so the macro will extract the data till end.

    Thanks in advance
    Attached Files Attached Files
    Last edited by rchure; 11-21-2017 at 09:04 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: Macro for extract data into new sheet

    You have way too many merged cells to work with. May be a good idea to set up the data sheet in a workable layout, then have another sheet to extract the information as you need it.

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro for extract data into new sheet

    This is really easy with Power Query:

    Please Login or Register  to view this content.
    Change the filepath / name as required, to point at your report file.

    See attached workbook for a worked example.
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Registered User
    Join Date
    04-04-2014
    Location
    India,Pune
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Macro for extract data into new sheet

    Hi,

    I am unable to do through power query.

    Also, unable to find where copy above code in power query.

    Can you please explain me the procedure?

    Thanks.

  5. #5
    Registered User
    Join Date
    04-04-2014
    Location
    India,Pune
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Macro for extract data into new sheet

    When I had run the query the data showing like different. I have attached the output file.
    Attached Files Attached Files

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro for extract data into new sheet

    Click 'Power Query > Get External Data > From Other Sources > Blank Query'

    The Query Editor window will open. Click 'Advanced Editor'.

    Paste in the query code as above - replace everything that's already in the query. Amend filepath / filename as required. Click 'Done'

    You'll see the Applied Steps of the Query in the Query Settings pane, and the query output in the editor window.

    Click 'Close & Load' - the query output will be put in a table, on a new worksheet. You can simply refresh this query to update the output, when your source file changes.

  7. #7
    Registered User
    Join Date
    04-04-2014
    Location
    India,Pune
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Macro for extract data into new sheet

    Thank you so much!
    Its working!!!

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro for extract data into new sheet

    Great, happy to help. If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. You can also 'Add Reputation' to those who helped you. Thanks.

+ 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. Extract data to another sheet - macro has bug
    By geliedee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2015, 05:26 AM
  2. [SOLVED] Macro Extract data to another sheet
    By geliedee in forum Excel General
    Replies: 0
    Last Post: 02-11-2015, 08:47 AM
  3. Macro to extract data into different sheet
    By vijanand1279 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2013, 05:26 PM
  4. [SOLVED] Macro to extract and list data on a new sheet
    By SilverFox in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2012, 10:53 AM
  5. Macro Needed to extract data from one sheet to another
    By JimmiOO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2012, 09:48 AM
  6. Macro to Extract data to another sheet
    By vijanand1279 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2011, 04:48 AM
  7. macro to extract data of a selected sheet
    By TUNGANA KURMA RAJU in forum Excel General
    Replies: 1
    Last Post: 02-27-2006, 02: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