+ Reply to Thread
Results 1 to 9 of 9

Show a link to the last 5 rows of a table from a different spreadsheet

  1. #1
    Registered User
    Join Date
    07-20-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    4

    Show a link to the last 5 rows of a table from a different spreadsheet

    Hi there,

    I am trying to have a preview of the last 5 or so rows from a table in another tab in the worksheet. Not sure if this is possible, but id like it to be linked so it is constantly updating with the source table. Please let me know if there is a way to do this.

    Thanks so much,

    Nick

  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,939

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Hi, welcome to the forum

    You could probably do this with COUNTA() a nd index/MATCH, but hard to say for sure without seeing a sample of what you have. Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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
    Registered User
    Join Date
    07-20-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Here is a copy of what it looks like / I'd like to see.

    Thanks for the quick reply!

    Cheers,
    Nick
    Attached Files Attached Files

  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,939

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Sorry for the delay in replying.

    Try this...
    A
    B
    C
    D
    E
    F
    G
    H
    1
    Top
    5
    2
    Recorded? Order # Date Order Type Customer Product Name Quantity Unit Price
    3
    X
    10
    1-Jul-16
    Sale Customer 10 Product 1
    7
    50
    4
    X
    11
    2-Jul-16
    Sale Customer 11 Product 1
    15
    50
    5
    0
    12
    3-Jul-16
    Sale Customer 12 Product 1
    14
    50
    6
    0
    13
    4-Jul-16
    Sale Customer 13 Product 1
    17
    50
    7
    0
    14
    5-Jul-16
    Sale Customer 14 Product 1
    10
    50

    B1 = the days you want displayed
    A3=IF(ROWS($A$1:A1)>$B$1,"",INDEX(Sheet1!B$21:B$35,MATCH(LARGE(Sheet1!$D$21:$D$35,$B$1+1-ROWS($A$1:A1)),Sheet1!$D$21:$D$35,0)))

    I used the range for the 2nd table you have, so you just need to adjust teh range to suite your actual data, something like this...
    =IF(ROWS($A$1:A1)>$B$1,"",INDEX(Sheet1!B:B,MATCH(LARGE(Sheet1!$D:$D,$B$1+1-ROWS($A$1:A1)),Sheet1!$D:$D,0)))

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Use table size=1 and it'll fit without text wrap.

    A
    B
    C
    D
    E
    F
    G
    H
    1
    Top
    5
    2
    Recorded? Order # Date Order Type Customer Product Name Quantity Unit Price
    3
    X
    10
    1-Jul-16
    Sale Customer 10 Product 1
    7
    50
    4
    X
    11
    2-Jul-16
    Sale Customer 11 Product 1
    15
    50
    5
    0
    12
    3-Jul-16
    Sale Customer 12 Product 1
    14
    50
    6
    0
    13
    4-Jul-16
    Sale Customer 13 Product 1
    17
    50
    7
    0
    14
    5-Jul-16
    Sale Customer 14 Product 1
    10
    50
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  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,939

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    @ Tony, was that to me?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Quote Originally Posted by FDibbins View Post
    @ Tony, was that to me?
    Yes
    ---------

  8. #8
    Registered User
    Join Date
    07-20-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Sorry for the delayed response, I've been travelling for work. I inputed your formulas into the sheet, but I only seem to get a #NUM! error when I do. I've tried playing around with it and can't seem to get it to work. Did you happen to have the sheet you did this on? Thank you so much for all your help.

    Cheers,
    Nick

  9. #9
    Registered User
    Join Date
    07-20-2016
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Show a link to the last 5 rows of a table from a different spreadsheet

    Nevermind! Jet lag has my mind turned into mush. It works beautifully. Thank you so much!

    Nick

+ 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. VBA Hide rows with 0 and show Table
    By Hendirler in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2016, 07:35 AM
  2. Replies: 3
    Last Post: 03-16-2014, 02:33 PM
  3. Replies: 2
    Last Post: 02-06-2012, 05:04 PM
  4. Replies: 4
    Last Post: 01-28-2010, 02:28 AM
  5. Pivot table, show empty rows
    By Hein in forum Excel General
    Replies: 4
    Last Post: 02-17-2009, 06:15 AM
  6. show duplicate rows in a pivot table using vba
    By ktpack in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2005, 11:05 PM
  7. [SOLVED] Do not show rows with no values in Pivot Table
    By Mark in forum Excel General
    Replies: 0
    Last Post: 04-19-2005, 02:06 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