+ Reply to Thread
Results 1 to 4 of 4

.offset clear range issue

  1. #1
    Forum Contributor
    Join Date
    09-08-2011
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    157

    .offset clear range issue

    I've got a macro that I've adapted from where instead of deleting a whole column, I just want into to delete the cell itself and 4 to the right and 3 to the left for example.

    heres my macro:
    Please Login or Register  to view this content.
    I just need help how to change my offset line as I can't get it to say delete like I said above, 4 cells to the right of the one it's checking and 3 to the left aswell as it's self if it's not in the range. also doing this between date ranges would leave gaps etc so rows of empty white cells, is there a way after it deletes I can tell it to fill the gaps ? as in move a row of data up in the specified range.

    I cant delete the row as theres data elsewhere on the sheet being used.


    Thanks K
    Last edited by kieranbop; 06-26-2012 at 05:51 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: .offset clear range issue

    Try change the code line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  3. #3
    Forum Contributor
    Join Date
    09-08-2011
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    157

    Re: .offset clear range issue

    With the amended code in my question above from the change suggested, if It deletes certain criteria, obviously it leaves blank cells looking empty, is there a way I can say once it's cleared those push up the other rows underneath eachother.

    Example information in row 1,2,3 then 7, 11, 99 . It notice theres a gap between the range above and then repositions the information underneath eachother?? any ideas or thoughts welcome please

  4. #4
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: .offset clear range issue

    Quote Originally Posted by kieranbop View Post
    is there a way I can say once it's cleared those push up the other rows underneath eachother.
    You should use method Delete of Range object, likes this:
    Please Login or Register  to view this content.

+ 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