+ Reply to Thread
Results 1 to 1 of 1

VBA. Correct formula in cell: replace cell references address and replace by its value.

  1. #1
    Registered User
    Join Date
    01-13-2013
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    1

    VBA. Correct formula in cell: replace cell references address and replace by its value.

    Dear Comrades,
    I have simple problem which can not solve ant that is why looking for advice.
    With help of VBA I would like to modify formulas in my excel sheet where formula's references are exchanged by formula with values.
    What I mean is:
    Cell A1.value= 5
    Cell B1.formula= 5*A1.value
    Cell C1.value = 12
    Cell B2.formula=$B$1+$A1/C$1

    I need a code which can check range (let say A1:C2) and replace all formulas by values only. Like: Cell B1.formula=5*5, Cell B2.formula=5*5+5/12. It is important to keep formulas instead replacing by final results. Should not be like Cell B1.formula=25

    Thanks in advance
    Alex

    PS
    The formulas in cell are just example. I need a generic code which can replace any references by values including references to other workbook sheets. No external workbooks are foresee
    n.
    Attached Files Attached Files
    Last edited by DKSOASO; 11-26-2020 at 04:52 PM. Reason: clarification

+ 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. Replace Cell References
    By JayKing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2018, 10:42 AM
  2. Replace Cell References
    By JayKing in forum Excel General
    Replies: 2
    Last Post: 11-07-2018, 10:42 AM
  3. Macro to find and replace specific strings in a cell link by using cell references
    By beginningcoder in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-15-2016, 09:37 PM
  4. How to check and replace formula cell absolute address?
    By alee001 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-19-2014, 11:26 AM
  5. [SOLVED] index match array formula - replace cell references with ranges
    By nigelog in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-17-2014, 10:39 AM
  6. Macro for division with absolute cell references to replace Indirect formula?
    By naira in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-14-2013, 01:37 AM
  7. [SOLVED] Replace range names with cell references?
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM

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