+ Reply to Thread
Results 1 to 21 of 21

How to remove empty space, unable to make pvot, because pvot calculate empty space

  1. #1
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    How to remove empty space, unable to make pvot, because pvot calculate empty space

    I HAVE MANY EMPTY CELL IN RANDOMLY. HOW TO REMOVE THAT, ALSO I DON'T WANT REMOVE SPACE BETWEEN TWO WORDS. JUST I WANT TO CLEAN EMPTY CELLS.. I CANT UNABLE TO MAKE PVOT TABLE. BECAUSE PVOT CALCULATE EMPTY CELL AS VALUE,

    SEE MY EXAMPLE FILE, B COLUMN IS JUST APPEAR AS EMPTY CELL, BUT TRUTH IS B IS NOT EMPTY, HOW TO SOLVE.

    I HAVE MANY DATA'S LIKE THIS IN SINGLE EXCEL, JUST I GIVEN SAMPLE EXCEL IN THIS THREAD..
    Attached Files Attached Files

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Perhaps a macro like this to "trim" column B?

    Please Login or Register  to view this content.
    Alf

  3. #3
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    i don't know about macro.. is there another way ?>...

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Here is how to install your macro and run it. Give it a try. It will save you lots of time and effort and you will probably want to learn more about them once you find out how fast and easy they operate.

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    yes alansidman, i tried many time time macro, i coudn't understand, but now i tried as you said, its working, i want learn more.. i dont know how to use macro give me some simple VBA code to workout myself. thanks..

    hi alf, your code is working well. i tried your program its first time to me, nice thank you..

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Glad to be of help and thanks for feed back.

    Alf

    Ps If this solves you problem don't forget to mark thread "Solved"

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Here is a link to a pretty good intro YouTube Video. You can find more YouTube videos by searching for what you want to do specifically.

    http://www.youtube.com/watch?v=7RVGdA9AhrY

  8. #8
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    hi alf, and alansidman, i just tried macro recording, wow wow its wonderful i didn't expect all this magic in excel. amazing.. i want learn more.. thanks for introducing macro..
    Last edited by vengatvj; 10-19-2013 at 05:24 PM.

  9. #9
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    how to remove shortcut keys. i save in personal macro workbook, i want remove all shorcut keys. i kept shortcut for just i learning purpose..

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Click on Alt + F8. Macro window opens. Click on Options. Remove the data in the Shortcut key textbox

  11. #11
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    THIS IS HAPPEN when i delete " cannot edit a macro on a hidden workbook. unhide the workbook using the unhide command"

  12. #12
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Perhaps this link will help?

    http://office.microsoft.com/en-us/he...#BMdeletemacro

    Check part "Delete a macro"

    Alf

  13. #13
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Please Login or Register  to view this content.
    this vba code for deleting B column empty or blank cell, i want like this to do more column delete blank cell, that columns are H, K, N, Q, S, Y
    I dont know how to create vba, i know only macro recording..

  14. #14
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    I want to make sure I understand. Do you wish to have code to delete columns H, K, N, Q, S and Y? You cannot delete a blank cell with out moving cells that are adjacent to it. Please explain with a clear example of what you are trying to do.

  15. #15
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    hai, in my orginal excel i have formula's in H, K, N, Q, S and Y colomn, formula give result in some cells only. other cells appear blank, but truth is really all the cells is not blank. so i cant make pivot. in pivot table calculate blank cells as value. after that i delete blank cells in this H, K, N, Q, S, Y column then pivot table give correct value.

  16. #16
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Not to happy about this macro still it works but it should be possible to write a more "condensed" macro,

    Please Login or Register  to view this content.
    Alf

  17. #17
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    thank you boss, i tried your vba, and learnt i want insert this vba in another one vba which one is my recorded macro vba, i will try to insert,

  18. #18
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    After fiddling around a bit I've managed to "compress" the previous macro. The string "sNam" contains the letters for the columns you wish to trim. Should you wish to trim other columns just change the letters in "sNam".

    Please Login or Register  to view this content.
    Alf

  19. #19
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    wow super nice. its working and deleting empty space, thank you so much, very thanks a lot, i need simple program like this, just share here more for basic useful, thank you dear friend..
    Last edited by vengatvj; 10-28-2013 at 11:34 AM.

  20. #20
    Forum Contributor
    Join Date
    09-19-2013
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    252

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    pls share some program like this, basic useful,
    Last edited by vengatvj; 10-28-2013 at 11:34 AM.

  21. #21
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to remove empty space, unable to make pvot, because pvot calculate empty space

    Glad to be of help and thanks for your kind words!

    As this problem now seems "Solved" could you pleas mark this thread "Solved"

    Alf

    Ps
    To mark your thread solved do the following:
    New Method
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

+ 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. 0 different from empty space
    By gexxy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2013, 01:46 PM
  2. Hide data labels on the x-axis that represent value of 0 (i.e. remove empty space)
    By lionlunatication in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 10:58 AM
  3. remove space in empty variable when using printToFile
    By cjg123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2011, 11:45 AM
  4. How to remove Empty Space in the Cell
    By ramki in forum Excel General
    Replies: 2
    Last Post: 06-27-2008, 04:27 AM
  5. Empty space
    By Genkster in forum Excel General
    Replies: 2
    Last Post: 10-16-2007, 01:05 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