+ Reply to Thread
Results 1 to 11 of 11

creating table in new sheet based on two other sheets

  1. #1
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    creating table in new sheet based on two other sheets

    hello,
    i've got same problem with writting a macro which will create a table in one sheet based on two other sheets. Like you can see in att i've got one table in sheet1 and second one in sheet2. I need to create new table in sheet three based on those two tables. But it's no so easy for me, becouse values should apear in specific column depend from which table they were taken.
    e.g.
    if name1 apear only on sheet1, on sheet3 there should be name1 and values from sheet1 in column value1, and 0 in column value2

    if name apear only on sheet2, on sheet3 there should be name and values from sheet2 in column value2, and 0 in column value1

    and

    if name apear on both (sheet1 and sheet2) there should be name on sheet3, values from sheet1 in column value1 and values from sheet2 in column value2.

    I hope Everything will be more clear if you check att excel file and picture.
    I know what should we write in the code but i have no idea how to write it I hope that someone will help me. If something is unclear in this post, just write i'll try to explain in
    ps.
    i think that i should add that sometimes my tables got 500 and sometimes 900 rows, and values are different, e.g. -100, 0, +100. I don't know is it important?
    I'll be really greateful if someone can help me.
    Thank You in advance
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by young_86; 11-20-2012 at 04:18 AM. Reason: title changed

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: creating one table from two different sheet

    If you are able to change your data in the format of sheet 4 you can use pivottable.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating one table from two different sheet

    Oeldere thanks for reply, but I can't use pivot tables. This is will be just part of my code, so i need different solution than pivot tables

  4. #4
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating one table from two different sheet

    maybe i should add that if some temporary sheet is necessary of course you can create one. I was trying to do this with formula, but it doesn't work

  5. #5
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating one table from two different sheet

    help stil needed

  6. #6
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating table in new sheet based on two other sheets

    up.
    anyone can help, or msybe give some tips how i can do thid?
    thank you in advance

  7. #7
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating table in new sheet based on two other sheets

    up.again

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: creating table in new sheet based on two other sheets

    With an pivot table.

    add new data

    and run the macro Sub AddAllDataOnTheFirstSheet()

    The pivot table will automatic refresh.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating table in new sheet based on two other sheets

    thanks for reply. Your solution help me a bit

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: creating table in new sheet based on two other sheets

    Please Login or Register  to view this content.
    It helps a bit ?

    What need to be changed?

    I see now you marked your question as solved.
    Last edited by oeldere; 11-24-2012 at 12:14 PM. Reason: I see now you marked your question as solved.

  11. #11
    Registered User
    Join Date
    10-28-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007/2010
    Posts
    94

    Re: creating table in new sheet based on two other sheets

    well i cant use pivot tables.like i wrote before this is just part of macro which i `m trying to write. im trying to solve my problem from different side..but if you got any solution i well he very pleased to hear it i`m really greateful for yout solution,becouse this post is on the forum for quite long time and not many people give any solution.so once again,Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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