+ Reply to Thread
Results 1 to 10 of 10

Re: Changing number of rows according to information from multiple tables

  1. #1
    Registered User
    Join Date
    01-24-2008
    Posts
    13

    Question Re: Changing number of rows according to number of entries from multiple tables

    Hi,
    I want names of products from multiple tables (like metal parts in 1 table, fabric in table 2, other material in table 3 and etc...) in sheet 1 to show up in order in another single table in sheet 2 with one entry after the next entry (in sequence with no spaces between different tables from sheet 1). Tricky part is not all the rows of the tables in sheet 1 are filled at all time (# of entries in each table alters depending on the product in sheet 1). So the table in the sheet 2 should make space in its table if something is entered. I hope this makes sense.

    thx
    Attached Files Attached Files
    Last edited by dami; 02-08-2008 at 04:25 PM.

  2. #2
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94
    Hi Dami,

    I have read your message, but I was wondering what you are trying to accomplish ultimately.

    Can you please give a little more background info?

  3. #3
    Registered User
    Join Date
    01-24-2008
    Posts
    13
    Quote Originally Posted by jevni1974
    Hi Dami,

    I have read your message, but I was wondering what you are trying to accomplish ultimately.

    Can you please give a little more background info?
    I am going to do calculations for each product obtained from sheet 1 (like cost, weight, life time and etc...) in the sheet 2. It would be nice if there were no spaces between the rows, since my actual list have many products. Also it would be benificial when printing it

    BTW file attached is a sample

  4. #4
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94
    Okay,

    I am wondering why you would keep the same data in separate lists.
    Why don't you create one list:

    column A, Column B
    gold, metal part
    etc.

    and use that list as a base?

    J.

  5. #5
    Registered User
    Join Date
    01-24-2008
    Posts
    13
    Sheet 1 is a standard sheet that must remain unchanged
    Quote Originally Posted by jevni1974
    Okay,

    I am wondering why you would keep the same data in separate lists.
    Why don't you create one list:

    column A, Column B
    gold, metal part
    etc.

    and use that list as a base?

    J.

  6. #6
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94
    Hi Dami,

    Then life will get quite complicated and you need to use VBA macros to keep things sychronised. I don't see a possibility to do this with worksheet functions.
    J.

  7. #7
    Registered User
    Join Date
    01-24-2008
    Posts
    13
    Quote Originally Posted by jevni1974
    Hi Dami,

    Then life will get quite complicated and you need to use VBA macros to keep things sychronised. I don't see a possibility to do this with worksheet functions.
    thx for replying, that's a bummer

  8. #8
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    Maybe one formulas play which might work here
    Implemented in this sample:
    http://www.freefilehosting.net/download/3bjd3
    Tables_dami.xls

    In Sheet2,

    In A2:
    =IF(OFFSET(Sheet1!$A$1,ROWS($1:1),)="","",
    IF(ISNUMBER(MATCH(OFFSET(Sheet1!$A$1,ROWS($1:1),),
    {"Metal parts";"Fabric";"Other"},0)),"",ROW()))
    Leave A1 empty

    In B2:
    =IF(ROWS($1:1)>COUNT(A:A),"",
    INDEX(Sheet1!A:A,SMALL(A:A,ROWS($1:1))))
    Select A2:B2, copy down to cover the max expected extent of source data.
    Minimize/hide col A. Col B returns the required results, all neatly bunched at the top.
    Max
    Singapore

  9. #9
    Registered User
    Join Date
    01-24-2008
    Posts
    13
    Thanks a lot this helps a lot!!, way better than what I have now!!
    I'll try to implement this method to my actual doc and see.

    If you can adjust the length of the table (so there won't be empty rows at the bottom too, cuz there's another table after the first), that would be awesome, but this method is good enough for now!!
    Quote Originally Posted by Max, Singapore
    Maybe one formulas play which might work here
    Implemented in this sample:
    http://www.freefilehosting.net/download/3bjd3
    Tables_dami.xls

    In Sheet2,

    In A2:
    =IF(OFFSET(Sheet1!$A$1,ROWS($1:1),)="","",
    IF(ISNUMBER(MATCH(OFFSET(Sheet1!$A$1,ROWS($1:1),),
    {"Metal parts";"Fabric";"Other"},0)),"",ROW()))
    Leave A1 empty

    In B2:
    =IF(ROWS($1:1)>COUNT(A:A),"",
    INDEX(Sheet1!A:A,SMALL(A:A,ROWS($1:1))))
    Select A2:B2, copy down to cover the max expected extent of source data.
    Minimize/hide col A. Col B returns the required results, all neatly bunched at the top.
    Last edited by dami; 02-11-2008 at 10:50 AM.

  10. #10
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    welcome, dami

+ 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