+ Reply to Thread
Results 1 to 6 of 6

Cleaning a range

  1. #1
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Cleaning a range

    Hello Experts,
    I am trying to go to the last row of column G and clear 13 rows and 5 columns (Column G through K and 13 rows including last ) using the following code and I am getting runtime error.

    [code]Range("G4").End(xlDown).Resize(ActiveCell.Offset(-12, 6)).ClearContents[code]

    Please advise.

    Best Regards/VKS
    Last edited by VKS; 08-20-2017 at 12:05 PM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Cleaning a range

    What range exactly do you need to clear ??
    Is this helps you
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Cleaning a range

    This should do it.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cleaning a range

    Thanks for your time and help Yasser. It didn't work for me.

  5. #5
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Cleaning a range

    Thanks Bakerman. Solved and Rep added.
    Best Regards/VKS

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Cleaning a range

    You're welcome and thanks for rep+.

+ 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. cleaning up data
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2016, 12:16 PM
  2. Cleaning a spreadsheet
    By Fugly in forum Excel General
    Replies: 1
    Last Post: 07-12-2012, 03:38 AM
  3. Cleaning up a report please
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-06-2012, 07:17 PM
  4. Help cleaning up a macro
    By gugg7378 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-23-2011, 01:23 PM
  5. Code needs cleaning up
    By hambone in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2010, 10:51 AM
  6. Data cleaning, HELP!
    By a303 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2007, 01:43 AM
  7. Data Cleaning
    By mazmjh in forum Excel General
    Replies: 1
    Last Post: 11-27-2006, 12:12 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