+ Reply to Thread
Results 1 to 5 of 5

Leaving a calculated cell blank until ready for calculation

  1. #1
    Registered User
    Join Date
    12-19-2011
    Location
    Sudbury, ontario
    MS-Off Ver
    Excel 2007
    Posts
    6

    Leaving a calculated cell blank until ready for calculation

    I am doing a draw for our office and have a rand formula to choose a name when we start the draw. The formula is already placed in my cell therefore it is already choosing a name. I would like it to be left blank until we are ready for the calculation. How can I do that?
    Last edited by Laliberte78; 01-06-2012 at 12:38 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Leaving a calculated cell blank until ready for calculation

    Maybe =IF(a1="1",your formula,"")
    type 1 in a1 to draw

  3. #3
    Registered User
    Join Date
    12-19-2011
    Location
    Sudbury, ontario
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Leaving a calculated cell blank until ready for calculation

    My boss will be drawing the actual name, he wanted to be able to press and hold F9 to quickly run through the names and let go randomly

  4. #4
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Leaving a calculated cell blank until ready for calculation

    One easy way would be to include a blank cell in the list of names. Before the draw press f9 until this blank name is chosen, and hope it doesn't get chosen again when your boss lets go of f9☺. I'm sure someone else has a better solution...

  5. #5
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: Leaving a calculated cell blank until ready for calculation

    If the boss is only choosing one name, the following might work:

    1. You could set the initial colour of the font in the cell where the name will be displayed to white (to match the background of the cell).
    2. Then insert this VBA code into the WorkSheet_Calculate code [to do this, right click on the sheet tab and choose 'View code'. Then on the code section of the VBA screen, change the dropdown that says 'General' to 'Worksheet' and the other dropdown to 'Calculate'
    3. Paste the following code between the Private Sub Worksheet_Calculate() and End Sub section:

    Please Login or Register  to view this content.
    {The above code assumes that the name will be shown in cell e3- change as required.

    When your boss holds F9 on the sheet where the name will be displayed and then releases it the result will be visible.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

+ 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