+ Reply to Thread
Results 1 to 10 of 10

once cell is cleared the totals result from code wont clear

  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    once cell is cleared the totals result from code wont clear

    Please help.. I wrote this code to sum and populate the results within Column P. The problem is that once the cells are cleared and the totals tab is hit again it does not remove the results. What was there before remains.


    Please Login or Register  to view this content.
    Thank you,
    Leslye

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: once cell is cleared the totals result from code wont clear

    lengwer,

    It's hard to tell what exactly the issue is just from the code. If you need it to not populate again, add a check at the beginning to see if the cells are cleared and if they are, exit the macro, otherwise continue.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Re: once cell is cleared the totals result from code wont clear

    Could you provide an example please?

  4. #4
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: once cell is cleared the totals result from code wont clear

    lengwer,

    Your code is in complete.Please send full codes.

    Regards

    Thameem

  5. #5
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: once cell is cleared the totals result from code wont clear

    try this.changes are highlighted

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Re: once cell is cleared the totals result from code wont clear

    That didn't change anything. is the exact same as the previous code I supplied.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Re: once cell is cleared the totals result from code wont clear

    When you clear our all of the cells in column P and then click the totals button the totals do not refresh. I need it to refresh when the button is clicked.

  8. #8
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: once cell is cleared the totals result from code wont clear

    lengwer,

    Can you provide a sample workbook demonstrating the issue?

  9. #9
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: once cell is cleared the totals result from code wont clear

    I have put in a few debug statements to help you diagnose the problem:

    When you run the code you should get messages printed in the VBA immediate window. Study these and see what they suggest

    Please Login or Register  to view this content.


    click on the * Add Reputation if this was useful or entertaining.

  10. #10
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Re: once cell is cleared the totals result from code wont clear

    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. Replies: 1
    Last Post: 06-21-2013, 04:05 AM
  2. vba code to clear contents of cell
    By codesRus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2012, 12:16 PM
  3. Adjust code for searching up to clear cell
    By pktrusty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2010, 03:21 AM
  4. Clear cell (VBA code)
    By Sharp in forum Excel General
    Replies: 4
    Last Post: 01-15-2007, 05:16 PM
  5. [SOLVED] How do I clear the Field pulldowns after the data is cleared?
    By Fred in forum Excel General
    Replies: 1
    Last Post: 06-06-2006, 12:10 PM

Tags for this Thread

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