+ Reply to Thread
Results 1 to 7 of 7

Removing spaces between data by macro

  1. #1
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Removing spaces between data by macro

    Hello guys many thanks for taking the time to look at my problem essentially i need to remove spaces between data by macro. I enclose an example showing what i have and what I need, with description.

    Many thanks

    Alan
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Removing spaces between data by macro

    Hi,

    Try this
    Please Login or Register  to view this content.
    This has to be inserted into the sheet code module.
    Whenever a value is updated in column c it's automatically inserted into column b
    Please take time to read the forum rules

  3. #3
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Removing spaces between data by macro

    Steffen Thomsen,

    I think he wants a macro to basically squish the code into one continuous column of data...

  4. #4
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Removing spaces between data by macro

    Yes correct i do want it squished, not simply copied to the column to the right.

    Cheers

    Alan

  5. #5
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Removing spaces between data by macro

    If data in column A should stay then

    Please Login or Register  to view this content.
    If data in column a should be deleted as well then
    Please Login or Register  to view this content.

  6. #6
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Removing spaces between data by macro

    This works on the test data. Attached is the "squiser2000" --- good for all your squishing needs


    Please Login or Register  to view this content.

    ----Edit----

    Wait...did i totally miss something? where you looking to delete the entire row of information if the b column was blank? I thought you were wanting to just adjust the B column and leave the other columns untouched...either way stefen() was way more slick... didn't see that before i went off to create this...

    Stepping backwards from the bottom...totally forgot you could change the step to a -1...much simpler
    Attached Files Attached Files
    Last edited by GeneralDisarray; 11-29-2011 at 03:37 PM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  7. #7
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Removing spaces between data by macro

    Im not sure if it's the whole row that should be deleted or only the cell in column b, thats why i provided 2 pieces of code

    Steffen

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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