Results 1 to 6 of 6

Need to have result from a formula in one cell appear in another cell...

Threaded View

  1. #1
    Registered User
    Join Date
    08-06-2014
    Location
    Tucson, Arizona
    MS-Off Ver
    XP
    Posts
    43

    Need to have result from a formula in one cell appear in another cell...

    I have a formula in A1 (it references about 100 different cells), and I'd like the result of A1 to appear in A2 without A2 containing a formula.

    There might be a REALLY simple solution to this though without reading the stuff below. I'm not opposed to locking A2, but when I do that, somehow the ability to copy the contents in A2 doesn't work. Maybe it's because I have checkboxes on my spreadsheet or there's a macro... I have no idea. But if there were a way to copy the results from A2 while that cell is locked, then that is all I would need. I could unlock that cell, but then there's the problem of the formula appearing if you double click the cell, and then all the stuff below...

    If I can't copy the contents of a locked then, then I could unlock the cell and use the following macro, but then that creates other problems....

    Here's the macro:

    Private Sub Worksheet_Change (ByVal Target As Range)
    Range("CellWithValue").Value = Range("CellWithFormula").Value
    End Sub


    In theory, this code works great because any time there is a change to the worksheet, the output in A2 always updates. Here's is my problem... I have a command button macro which deletes about 200 fields on the worksheet when clicked, but when I use the code above, it takes a while for all the fields to be cleared because every time a field is cleared it counts as a change and then the code above runs 200 times, which in turn increases the time it takes for the command button to run and clear all the fields.

    So I need a macro or something that hardcodes the results in A1 to A2, and it must be dynamic so that if there is a change on the worksheet, A2 is updated, BUT I want to keep my "clear all fields" command button without it running so slowly.

    Here's my idea: if you click on the "clear all" command button, it clears all fields, but only the last field cleared is identified by the code above as a change. So the "clear all" button clears all fields, and isn't slowed down by the code above.

    Any idea on how to do that?
    Last edited by danielneedssomehelp; 08-06-2014 at 05:44 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Conditional format a cell based on a result of a formula in another cell
    By Taiter in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-20-2013, 04:45 PM
  2. [SOLVED] Conditional format a cell based on a result of a formula in another cell
    By Taiter in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2013, 01:47 PM
  3. [SOLVED] Code to delete cell contents IF the result of a formula in the cell = 0
    By jayjaynz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-22-2013, 03:58 AM
  4. Replies: 6
    Last Post: 09-16-2010, 05:19 AM
  5. Advanced formula - Return result & Show Cell Reference of result
    By Irv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-05-2006, 10:40 PM

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