+ Reply to Thread
Results 1 to 9 of 9

Clear values, save formulas; Recalculate

  1. #1
    Registered User
    Join Date
    08-07-2004
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    62

    Clear values, save formulas; Recalculate

    The attached sheet is used to inventory lottery tickets. The ticket number is scanned with a barcode reader and the info placed on an input line. Several other details are added then the line is "Added to inventory" with the macro button. The macro clears the input line so the next item can be entered. I can't clear the values without dumping the formulas in the calculating cells, which wouldn't be an issue but the cells won't recalculate the new input.

    I need to be able to clear the cell values (but leave the formulas) and need to kick the sheet to recalc the input row. Ideas?
    Attached Files Attached Files
    Last edited by itsunclebill; 03-21-2010 at 06:23 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Clear values, save formulas; Recalculate

    Not sure what you mean, the code clears the cells,but leaves the formulas in the input line
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-07-2004
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    62

    Re: Clear values, save formulas; Recalculate

    The macro runs this
    Please Login or Register  to view this content.
    as part of the process. It's the only way I know to clear the cells with values in them. The code leaves formulas but also leaves the previously calc'd value. The line doesn't want to recalculate so I have to manually force the calculations to happen and don't understand why.

    Hit the "add to Inventory" key and see what happens

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Clear values, save formulas; Recalculate

    Your example has Calculation set to Manual, see the Formulas Tab

  5. #5
    Registered User
    Join Date
    08-07-2004
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    62

    Re: Clear values, save formulas; Recalculate

    Didn't know THAT was even in there. Thanks.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Clear values, save formulas; Recalculate

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Clear values, save formulas; Recalculate

    This will be quicker than your loop for non formula cells
    Please Login or Register  to view this content.
    Also,why the macro Sheet?

  8. #8
    Registered User
    Join Date
    08-07-2004
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    62

    Re: Clear values, save formulas; Recalculate

    Thanks for the clearcontents.

    Macro sheet is junk left over from another project and is just there and handy for the data valadation list. The project is VERY early alnog at this point and I haven't done my housecleaning yet.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Clear values, save formulas; Recalculate

    Macro sheets are from Excel 95 I believe & totally unnecessary for later versions, use an ordinary worksheet

+ 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