+ Reply to Thread
Results 1 to 8 of 8

Automatically appending two tables of data into a third table

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Automatically appending two tables of data into a third table

    Hi,

    What I am trying to do is to automatically merge two tables of data i.e. Table 1 & Table 2 into Table 3.

    i.e. Table 1 & Table 2 have a maximum of 10 rows of data each and Table 3 is a table with 20 rows. My problem is I need to automatically appended Table 1 & Table 2 into Table 3, however either Table (1 or 2) may or may not have their 10 rows of data completed but I want Table 3 to be one continuous table of data (please see attached file for example).

    Ideally I would prefer a formula as opposed to macro code or VBA but I would appreciate any potential solution.

    Any assistance in this matter would be greatly appreciated

    Many thanks in advance

    Bob

    Excel Version 2003
    Attached Files Attached Files
    Last edited by robertguy; 02-24-2010 at 12:05 PM. Reason: to mark as [SOLVED]
    Rob

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically appending two tables of data into a third table

    With the addition of a key column with formulas, this become a simple index/match function.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    “#VALUE!” when displaying text in Table 1 & Table 2

    JBeaucaire

    Many thanks for your prompt reply it us very much appreciated.

    You coded worked really well until I entered text into the first column of Table 1 & Table 2 resulting in your formula in column ‘F’ (Key) change to “#VALUE!”.

    Any idea how to amend your code to accommodate text in any of the columns in Table 1 & Table 2

    Regards


    Rob

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically appending two tables of data into a third table

    Change this:

    =IF(C6<>"", N(F5)+1, N(F5))

  5. #5
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Automatically appending two tables of data into a third table

    JBeaucaire.

    I've changed the formula and it seem to have messed Table 3 up completely

    I've attached the file and would really appreciate it if you could take a look


    Regards


    Rob
    Attached Files Attached Files

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically appending two tables of data into a third table

    You didn't notice the formula in F18 and F19 aren't adjacent. In F19:

    =IF(C19<>"",N(F18)+1,N(F18))

  7. #7
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Thumbs up Re: Automatically appending two tables of data into a third table

    JBeaucaire

    I can see where I went wrong - Many thanks

    I've made a note to myself to check if ever I insert extra rows as it could cause the formulas to be thrown out of synch.

    For others to benefit from the code I have uploaded the working file

    Once again many thanks for all your time and effort it is very much appreciated


    Best regards

    Rob

  8. #8
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Thumbs up Re: Automatically appending two tables of data into a third table

    JBeaucaire

    I can see where I went wrong - Many thanks

    I've made a note to myself to check if ever I insert extra rows as it could cause the formulas to be thrown out of synch.

    For others to benefit from your code I have uploaded the working file

    Once again many thanks for all your time and effort it is very much appreciated


    Best regards

    Rob
    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