+ Reply to Thread
Results 1 to 3 of 3

Why the 'ClearContents' cleared the wrong range

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Why the 'ClearContents' cleared the wrong range

    Hi everyone,

    My simple macro below is not something I have expected. I want the range A3:A5000 to be cleared. But actually cell A2 is also cleared. Can you help?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Why the 'ClearContents' cleared the wrong range

    Because B2:A5000 includes A2.

  3. #3
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: Why the 'ClearContents' cleared the wrong range

    Hi, JieJenn, sorry for such a silly mistake 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. Contents cleared regardless of range
    By kelkelkel08 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2013, 04:51 AM
  2. [SOLVED] Range clearcontents
    By tradinup2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-12-2013, 03:38 PM
  3. [SOLVED] Alternative to ClearContents so Formulas are not Cleared
    By Ceekimmy in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 11-17-2012, 02:31 AM
  4. [SOLVED] Clearcontents on a range is cause a runtime error
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2012, 03:35 PM
  5. Clearcontents of a range but keep formula in tact
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2008, 02:17 PM
  6. Clearcontents of range on multiple worksheets
    By stephenw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2007, 10:37 AM
  7. [SOLVED] after clearcontents() new data is positioned below the cleared ran
    By Rea Peleg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-21-2005, 10:05 AM
  8. [SOLVED] wrong positioning of data in sheet after clearcontents()
    By Rea in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2005, 08:05 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