+ Reply to Thread
Results 1 to 4 of 4

Recalculate on condition

  1. #1
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29

    Recalculate on condition

    Is there a way to make excel recalculate a spreadsheet if a given condition is met/not met?

    EG, =if(A1 ><1,"",recalculate)
    Regards,

    David Obeid

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    I assume your worksheet is set to manual recalculation and that you meant that A1<>1 (Not equal to) below?

    If so you can place this code in the Worksheet_Change event

    Please Login or Register  to view this content.
    Hope this helps!


    Quote Originally Posted by DavidObeid
    Is there a way to make excel recalculate a spreadsheet if a given condition is met/not met?

    EG, =if(A1 ><1,"",recalculate)
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29
    Thanks Excelenator,

    I actually meant >= 1

    The spreadsheet automatically calculates, but some values are user defined, some the result of formulae and some the result of a randomly generated number.

    I don't know VBA, so can you give me idiot proof instructions as to how to implement the solution?

  4. #4
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    Sure thing.
    1. Copy the code below
    2. Right click on the sheet tab of the sheet containing your data
    3. Select "View Code"
    4. This will take you to the VBE (Visual Basic Editor)
    5. You should see two drop down boxes towards the top of the screen
    6. The one on the left says "General". Drop down and select "Worksheet"
    7. Highlight the code that gets populated and right click and select Paste to paste in the code below.
    8. Return to your worksheet

    Now anytime the value of Cell A1 is >= 1 the worksheet will recalculate.

    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