+ Reply to Thread
Results 1 to 6 of 6

Copy Last 10 Values in a Column

  1. #1
    Registered User
    Join Date
    09-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    21

    Copy Last 10 Values in a Column

    Hi Excel Guru's, another request for your expertise!

    I have a spreadsheet with a column of values. This column of numbers grows longer every day as new data is added. I need a macro that will copy just the last/bottom 10 cells or values in that column, so that I can throw it into a graph to show the latest figures daily. Obviously it would have to continuously update to find the last/bottom 10 values as the list regularly grows.

    I feel this should be an easy solution, but just can't figure it out at the moment. Any help is appreciated, thanks!

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Copy Last 10 Values in a Column

    Hi excelheporfavor,

    you can establish the last line in the column, then do a loop for last 10 to copy.....

    find last row:
    Please Login or Register  to view this content.
    then:
    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Copy Last 10 Values in a Column

    Or
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Copy Last 10 Values in a Column

    jolivanes,

    Showoff :p

    haha just kidding, much more sophisticated approach Nicely done.

  5. #5
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Copy Last 10 Values in a Column

    You dont need VBA, you can do this with formula, will the 10 cells info always be in the same place for the chart?


    Please Login or Register  to view this content.
    etc.etc.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  6. #6
    Registered User
    Join Date
    09-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Copy Last 10 Values in a Column

    Perfection jolivanes...thanks to everyone who provided a solution!

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Copy Last 10 Values in a Column

    I know you marked it solved but you can reference as follows also.
    No need to copy/paste cell then.

    (From Tushar Metha's site)

    Cell E1 has the number of the last amount (in your case 10) to be shown in the graph. The reference to cell E1 can be replaced by the number 10 of course.
    Column A starts at row 5 and has the Y values and column B also starts at row 5 and has the X values. (Change as required)

    Xvalues=OFFSET('Sheet1'!$A$5,COUNTA('Sheet1'!$B:$B)-'Sheet1'!$E$1,0,'Sheet1'!$E$1,1)
    YValues=OFFSET('Sheet1'!XValues,0,1)
    Last edited by jolivanes; 07-11-2014 at 12:42 PM. Reason: add info

+ 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. [SOLVED] Copy a column of mixed date values and increment all values by 1 day
    By Jonj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 04:05 AM
  2. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  3. [SOLVED] Loop-copy cell values from a row, and then copy them into a column
    By vukovicnikola in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2012, 06:03 AM
  4. Replies: 0
    Last Post: 09-06-2012, 04:06 AM
  5. Macro that will copy values in Column J and paste values to Column B in new sheet
    By Phixtit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2010, 04:56 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