+ Reply to Thread
Results 1 to 19 of 19

Transfer data to specific tables according to year

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Transfer data to specific tables according to year

    Hello everyone
    I have sheets("Data"). In Column A I have dates but dates are recorded as text like that
    910 >> mean October 2009 - 1001 >> means January 2010 - 1408 >> means August 2014

    In sheets("Output") I need to transfer data according years to the proper table as illustrated in Output sheet
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Transfer data to specific tables according to year

    910 >> mean October 2009 - 1001 >> means January 2010 - 1408 >> means August 2014
    why? Excel works really well with proper dates.

    Where is this data coming from?
    Have you considered using a helper colum to create real dates from this?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    Ok Mr. FDibbins
    you can use helper column .. but how to transfer to these tables?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Transfer data to specific tables according to year

    hmm OK lookinfg at your data again, I think all you need is this in C2, copied down and across...
    =IFERROR(INDEX(Output!$B$2:$N$50,MATCH(Data!$B2,Output!$A$2:$A$50,0),MATCH(Data!C$1,Output!$B$1:$N$1,0)),"")

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    Thanks for help but I need to transfer data from Data sheet to Output sheet in the existing tables

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Transfer data to specific tables according to year

    Thats what that does.

    If you put that in C2 on Output, and copy down/across, it produces the same values as your sample

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    First why to put this formula in C2 and not in A2
    Second I expect results for 2009 to be in rows 2 :5 and the results for 2012 to be in rows 7:12 and there are sum formulas in between every two years ..

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: Transfer data to specific tables according to year

    OK, I was basing my answer on the sample you provided in OUTPUT sheet, on the data you had in column B (Date)

    Are you saying that you wont have the values in column B in OUTPUT? Because that looks to me to be a relatively simple progression

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transfer data to specific tables according to year

    Hi Yasser,

    Try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 08-01-2015 at 08:45 PM. Reason: Number of rows to insert correction
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    Mr. xladept
    Thank you very much for this magic solution
    It's exactly what I need ....
    You're very helpful and awesome

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transfer data to specific tables according to year

    Hi Yasser,

    You're welcome and thanks for the rep!

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    Mr. xladept
    I tested the code and find that the code insert rows automatically in results sheet if there are more rows
    I need to delete the empty rows and to put the sum formulas by code ?
    Sorry for bothering you again
    Last edited by YasserKhalil; 08-03-2015 at 08:58 AM.

  13. #13
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transfer data to specific tables according to year

    Hi Yasser,

    Try this - I also changed the code to get all the Columns labeled "Header".

    Please Login or Register  to view this content.

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    Thanks again and again Mr. xladept for this great solution.
    In fact I need this report to be reformatted by code ..
    I will attach my basic entry and need to get the results with borders inside and outside and the results to be with no colors .. Just the totals for every year to be colored as illustrated ..
    As for sum formulas I need to get only the values ..

    Hope it is clear
    Thanks advanced
    Attached Files Attached Files

  15. #15
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transfer data to specific tables according to year

    Hi Yasser,

    Try this:

    Please Login or Register  to view this content.

  16. #16
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    Thanks a lot Mr. xladept
    I'm so sorry for not clarifying my request well forgive me please
    your last code is wonderful .. for totals for all the years and the whole total at last ..
    But I need to insert rows of details for every year (these rows shouldn't be colored (No Fill) and with inside and outside borders for the whole table at the end
    Thanks for your time and effort. I appreciate your geat and wonderful help

  17. #17
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transfer data to specific tables according to year

    HI Yasser,

    Try this- but you can't run it twice

    Please Login or Register  to view this content.
    And - Thanks for the rep given before!

  18. #18
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Transfer data to specific tables according to year

    I really can't believe myself
    You are awesome .. Thanks a lot for this masterpiece
    Thank you very much
    Regards

  19. #19
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transfer data to specific tables according to year

    You're welcome and 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. Replies: 25
    Last Post: 12-30-2013, 07:52 AM
  2. [SOLVED] Copy Data from Range on Specific Worksheet and Transfer Data to New Workbook
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-22-2013, 08:24 AM
  3. [SOLVED] Transfer specific data onto new sheet
    By Johfra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2013, 11:33 AM
  4. Transfer survey data from multiple tables into one
    By zasp_luke in forum Excel General
    Replies: 0
    Last Post: 06-26-2012, 11:27 PM
  5. Transfer specific data on specific worksheet using userform
    By kriscar_44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2010, 04:03 AM
  6. Transfer Data to separate tables based two variables (site and product)
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2010, 09:47 PM
  7. Transfer Data to separate tables based two variables (date and site)
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2009, 08:30 PM
  8. Transfer data for specific dates
    By sandbach in forum Excel General
    Replies: 4
    Last Post: 09-26-2009, 04:04 PM

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