+ Reply to Thread
Results 1 to 6 of 6

Auto-replace a cell's formula with its value

  1. #1
    Registered User
    Join Date
    03-02-2015
    Location
    Arizona
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO
    Posts
    14

    Auto-replace a cell's formula with its value

    I want to: automatically replace a cell (that has a formula) with its value the moment the cell becomes non-blank.


    For example, I have three columns B, G, M with formulas in them. Each cell in these columns are blank until their row's cell in column A is filled out.

    When A2 is filled out - B2, G2, and M2 will show a value and no longer be blank. At this moment, I would like B2, G2, and M2 to instantly replace themselves with the calculated value, so that they no longer contain formulas.

    I do not want to click a button or perform any action to accomplish this, other than filling in A1. This should work when I fill in A2 and A5, etc.


    As I understand it, this requires VBA. Thank you for any help you can provide me!
    Attached Files Attached Files
    Last edited by justinx; 04-14-2015 at 05:00 AM.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Auto-replace a cell's formula with its value

    Can be done..

    Please attach your sample workbook..
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    03-02-2015
    Location
    Arizona
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO
    Posts
    14

    Re: Auto-replace a cell's formula with its value

    Quote Originally Posted by NeedForExcel View Post
    Can be done..

    Please attach your sample workbook..
    Done! Thank you!

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Auto-replace a cell's formula with its value

    Here!

    Right click on the sheet and select view code & paste it there


    Please Login or Register  to view this content.

    *Your workbook is currently .xlsx. You will have to save it as .xls or .xlsm to store the Macro
    Last edited by NeedForExcel; 04-14-2015 at 06:24 AM.

  5. #5
    Registered User
    Join Date
    03-02-2015
    Location
    Arizona
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO
    Posts
    14

    Re: Auto-replace a cell's formula with its value

    Quote Originally Posted by NeedForExcel View Post
    Here!

    Right click on the sheet and select view code & paste it there


    Please Login or Register  to view this content.

    *Your workbook is currently .xlsx. You will have to save it as .xls or .xlsm to store the Macro
    Wow, exactly what I needed. Works perfectly. Thank you so much, NeedForExcel! Have a great day!

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Auto-replace a cell's formula with its value

    Glad it helped!

    Please mark the thread as solved..

+ 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. Search and Replace Text with a formula and adjacent cell with a formula
    By 1p3261 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2015, 12:14 PM
  2. Formula to Replace Portion of Cell that Contains Matched Text to Cell
    By celestealexandra in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-22-2014, 03:56 PM
  3. [SOLVED] Product lookup and auto-replace cell with new value
    By jamief in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-11-2014, 05:44 PM
  4. [SOLVED] identify unique ID between 2 sheets, auto replace cell values between sheets in diff colum
    By DT123456 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2012, 08:25 AM
  5. Auto-replace typed contents in a cell with a formula
    By Josiah in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-10-2008, 02:41 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