+ Reply to Thread
Results 1 to 4 of 4

Automatically replace the formula in a column

  1. #1
    Registered User
    Join Date
    11-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    2

    Automatically replace the formula in a column

    How do I replace the formula in a column that had been overwritten with a number after that number is cleared?

    See attached file. Cell B6 has simple formula of $C6 * $D6. I must allow data entry into cell B6 for an override. If cell B6 is cleared, how do I get my original formula located in column E6 back into B6.

    I've tried locking and protecting cell B6 but then I can't overwrite it.
    I figured out a way to do this by using 5 different fields, but this solution is really clumsy if I want to replicate Colum B. (see attached)
    If must use a macro, I don't need the logic, I just need to know that a macro is required.

    Thank you very much for your help.
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Automatically replace the formula in a column

    Try this.....

    Please Login or Register  to view this content.
    Hope this helps.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    11-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Automatically replace the formula in a column

    Thank you sktneer.
    Is the code mentioned in your reply code for a macro?
    See I'm an analyst and not a programmer and I've never written a macro, so I tried copying the code you provided into a cell and all I got was text.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Automatically replace the formula in a column

    OK. Right click on your sheet tab (like Sheet1), select View Code and then paste the entire code in the opened vba window and close the window. Now you macro is ready to work as per your requirement.

+ 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. Replies: 3
    Last Post: 10-08-2013, 09:46 AM
  2. Replies: 3
    Last Post: 05-21-2013, 06:02 AM
  3. Automatically add formula to next cell in column
    By JOGIER in forum Excel General
    Replies: 3
    Last Post: 04-22-2009, 03:31 PM
  4. Automatically Adjusting a Column with a Formula
    By mellissacook in forum Excel General
    Replies: 5
    Last Post: 04-09-2008, 04:18 PM
  5. [SOLVED] how do i automatically replace formula with results
    By Eric in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-09-2006, 02:15 PM

Tags for this Thread

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