+ Reply to Thread
Results 1 to 13 of 13

Keep row at the end of pivot table

  1. #1
    Registered User
    Join Date
    05-25-2014
    Posts
    34

    Keep row at the end of pivot table

    Hi,

    I don't know exactly how to do this. In pivot table1 for "Date" I want to find the row with the word Target 1 and move the entire row to the end of the pivot table.

    How can I do this with VBA?


    Thanks in advance

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

    Re: Keep row at the end of pivot table

    I am not sure, i dont think it is.
    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

  3. #3
    Registered User
    Join Date
    05-25-2014
    Posts
    34

    Re: Keep row at the end of pivot table

    Is there another way to keep the row with Target 1 always at the end of pivot table?

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

    Re: Keep row at the end of pivot table

    You could have an array formula type affair on a separate sheet just taking a direct link, but changing for the last row.

    Is it definately in need of a pivot?

  5. #5
    Registered User
    Join Date
    05-25-2014
    Posts
    34

    Re: Keep row at the end of pivot table

    Yea it has to be in a pivot table. I'm not sure how I am meant to execute your suggestion...

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

    Re: Keep row at the end of pivot table

    I think it is,

    Please Login or Register  to view this content.
    basically that 4 is the pivotitems count, so i'd have a play with that.

  7. #7
    Registered User
    Join Date
    05-25-2014
    Posts
    34

    Re: Keep row at the end of pivot table

    Thanks, what can I do if pivot table is always dynamic and it adds a new row each day?

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

    Re: Keep row at the end of pivot table

    Still use the pivotitems count, this will be as dynamic as the report is.

  9. #9
    Registered User
    Join Date
    05-25-2014
    Posts
    34

    Re: Keep row at the end of pivot table

    Okay thanks so much Nathan :-). I will try it when I get to work tomorrow

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

    Re: Keep row at the end of pivot table

    Not a problem, refresh the pivot table before you take the count, so you can be certain its correct

  11. #11
    Registered User
    Join Date
    05-25-2014
    Posts
    34

    Re: Keep row at the end of pivot table

    its not working

    Please Login or Register  to view this content.
    Everytime I add a new item it adds a new row even though I have specified to only have 22 items. If I could get code to find "Target 1" in col B and move it down one, then that will do the trick.

    Any ideas?

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

    Re: Keep row at the end of pivot table

    Can you attach an example please? "Target 1" or "1 Target"

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

    Re: Keep row at the end of pivot table

    Please Login or Register  to view this content.
    This works fine for me.

+ 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. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM
  2. Replies: 1
    Last Post: 06-22-2010, 09:10 AM
  3. Replies: 1
    Last Post: 06-20-2010, 04:00 AM
  4. Replies: 0
    Last Post: 03-22-2009, 07:17 PM
  5. Return pivot table range...not the data table, the PIVOT TABLE!
    By Air_Cooled_Nut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2008, 01:07 PM

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