+ Reply to Thread
Results 1 to 5 of 5

Copying formula result to new cell, without copying formula itself

  1. #1
    Registered User
    Join Date
    06-09-2016
    Location
    USA
    MS-Off Ver
    2007
    Posts
    27

    Copying formula result to new cell, without copying formula itself

    I've included my excel as its hard for me to explain it without referring to an example, so please download sheet.

    You'll see I have a button named " New > Original, Delete Measurements". Right now, that button runs a macro that deletes cells D18, D30, I18, I30.

    I would also like it to take the results that are in G4 and G5, and put them in C4 and C5. But only the results, not the formulas themselves. But the results in G4 and G5 are based on the data that is in D18,D30,I18,I30, which the macro is deleting. So I just want to copy the formulas results to other cells before I delete the cells that the formula is using to get its results.


    To simply it,

    A1: 2
    A2: 3
    A3: =A1+A2 (which would be 5)

    I am looking to first have excel copy the result, 5, to cell B1; then delete the data in cells A1 and A2 (which would then make A3 a 0 again, but Id have the old result, 5, in B1.)
    Attached Files Attached Files
    Last edited by nappyjim1; 06-19-2016 at 02:26 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,485

    Re: Copying formula result to new cell, without copying formula itself

    Hi NappyJim,

    Record your macro again and when you copy do a "Paste Values Only" to the cells you want. When you do this it doesn't use any of the formulas. Then when you Delete2 the values copied will stay.

    A great way to learn VBA is to record macros and then look to see what VBA looks like for the keystrokes you recorded.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,927

    Re: Copying formula result to new cell, without copying formula itself

    I agree with Marvin on that, however be wary that the macro recorder often writes long and inefficient code which will need lots of tidying.

    BSB

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-09-2016
    Location
    USA
    MS-Off Ver
    2007
    Posts
    27

    Re: Copying formula result to new cell, without copying formula itself

    Thanks to you both!

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,927

    Re: Copying formula result to new cell, without copying formula itself

    Happy to help. Thanks for the rep

    Don't forget to mark the thread as SOLVED if you're happy you have a working solution.

    BSB

+ 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. copying a formula to 8 cells lower with a result of 1 cell lower
    By dyosa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2014, 11:52 PM
  2. Copying result of formula
    By mrstuck in forum Excel General
    Replies: 3
    Last Post: 09-10-2009, 12:56 PM
  3. Pasting a formula automatically accross sheets and then copying result
    By farmertml in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2009, 07:48 AM
  4. Copying a formula result
    By Dave_A in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-22-2007, 09:13 AM
  5. [SOLVED] Copying result of formula into another worksheet???
    By Amanda in forum Excel General
    Replies: 3
    Last Post: 04-15-2005, 05:06 PM
  6. how do i copy a formula's result to another cell, without copying.
    By Mili in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2005, 09:06 PM
  7. [SOLVED] How do I copy a result without copying the formula?
    By riffmastr7 in forum Excel General
    Replies: 2
    Last Post: 02-02-2005, 04:06 PM
  8. [SOLVED] copying a formula, the reference adjusts, but the result does not
    By chezoo in forum Excel General
    Replies: 1
    Last Post: 01-11-2005, 10:06 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