+ Reply to Thread
Results 1 to 11 of 11

Remove blank rows in pivot WITH MACRO

  1. #1
    Registered User
    Join Date
    07-18-2019
    Location
    iran
    MS-Off Ver
    2016
    Posts
    68

    Remove blank rows in pivot WITH MACRO

    HI
    I have an excel file when apply pivot, often appear blank rows . I do not want has any blank row with macro or .....
    thank from help.
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Remove blank rows in pivot WITH MACRO

    Hello habib100,

    You can remove work 'Blank' from pivot table very easly. Select the column where word blank is coming, go to edit and select replace now in Find write (Blank) and in replace just press tab button two times then ok..... now you can see blank is removed from the pivot.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    07-18-2019
    Location
    iran
    MS-Off Ver
    2016
    Posts
    68

    Re: Remove blank rows in pivot WITH MACRO

    no,I need a command with macro

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Remove blank rows in pivot WITH MACRO

    Hello habib100,

    Enter the Code below in a Standard Module;

    Please Login or Register  to view this content.
    Create a Button on the relevant Sheet and assign the Macro above to that Button.

    See attached sample Workbook.
    Attached Files Attached Files
    Last edited by Winon; 10-18-2019 at 04:42 PM. Reason: Changed Code

  5. #5
    Registered User
    Join Date
    07-18-2019
    Location
    iran
    MS-Off Ver
    2016
    Posts
    68

    Re: Remove blank rows in pivot WITH MACRO

    Hello Winon
    thank, but Those rows don't disappear with this code?
    I Would remove this rows that shown in example file.
    Attached Files Attached Files

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Remove blank rows in pivot WITH MACRO

    Hello habib100,

    It would seem that one cannot delete a Row from a Pivot Table.

    The best I could do is:

    Please Login or Register  to view this content.
    Regards.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-18-2019
    Location
    iran
    MS-Off Ver
    2016
    Posts
    68

    Re: Remove blank rows in pivot WITH MACRO

    Hello Winon
    Thank , ok If I want to put this button in Sheet 1, how the code changes?

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Remove blank rows in pivot WITH MACRO

    Hello habib100,

    Copy the first Sub DelBlank(), paste below it, and rename it.

    Please Login or Register  to view this content.
    Now change Sheet2 to Sheet1 and ensure you reference the correct PivoFields applicable to Sheet1.

    Create a Forms Button on Sheet1 and assign the Macro above to that Button.

  9. #9
    Registered User
    Join Date
    07-18-2019
    Location
    iran
    MS-Off Ver
    2016
    Posts
    68

    Re: Remove blank rows in pivot WITH MACRO

    Hello Winon
    Solved
    thanks...........

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Remove blank rows in pivot WITH MACRO

    You are welcome habib100,

    Glad I could help and thank you for the Rep+. I appreciate it.

  11. #11
    Registered User
    Join Date
    07-18-2019
    Location
    iran
    MS-Off Ver
    2016
    Posts
    68

    Re: Remove blank rows in pivot WITH MACRO

    thank you

+ 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. Remove blank rows in pivot
    By habib100 in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 10-21-2019, 11:50 PM
  2. Remove Pivot Table fields with blank rows
    By Ramtrap in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-14-2017, 02:38 PM
  3. Need some help please - Macro to create a CSV file and remove blank rows.
    By stuhelhall in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-05-2016, 09:34 PM
  4. How to remove blank rows when using 'Difference to' in a Pivot
    By AndrewHowarth in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 09-30-2015, 03:48 AM
  5. Macro to remove extra blank rows
    By alexduy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2013, 01:20 PM
  6. [Macro] Remove blank rows (apart from 1 to separate datasets)
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-08-2011, 05:41 PM
  7. Need macro to remove blank rows
    By Bob in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-21-2006, 08:25 AM

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