+ Reply to Thread
Results 1 to 13 of 13

Change the cell reference formula to cell value

  1. #1
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Change the cell reference formula to cell value

    Hi All,

    I have sheets which is linked each other, when i try to delete sheet the links are showing ref error.

    I need a vba code to change the cell references to Cell Value in all the cells.

    Any help appreciated.

    Thanks
    Jude

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Change the cell reference formula to cell value

    Does this help?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: Change the cell reference formula to cell value

    Hi John,

    Apparently i need only the cell reference linked with the Main Sheet which is MASTER to become cell value, other formulas remain to be a formula

    is there any to make it as value

    Thanks
    Prem

  4. #4
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: Change the cell reference formula to cell value

    Hi John,

    One more thing some cells in the sheet having formula =SUM(a1:a10)/Master!B10, so when i delete the sheet Master the formula cell showing ref error, ideally this cell should become a value. So wherever the Master! link should become a value.

    Many thanks for your help

    Regards
    Jude

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Change the cell reference formula to cell value

    Can you attach a sample sheet? Do you have specific ranges that link to Sheets Master? Range.value = Range.value will return the value only? Hope that helps.

  6. #6
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: Change the cell reference formula to cell value

    If its specific range yes i can use range.value, apparently its all over the sheets

    I tried to use cell.formula like "*MASTER*" Then cell.Value = cell.value and it didn't work

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Change the cell reference formula to cell value

    This worked for me, when I tested it?

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: Change the cell reference formula to cell value

    Hi John,

    I tried and it didn't work, am i doing something wrong.

    I have attached the sample file.

    Many thanks
    Jude
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Change the cell reference formula to cell value

    No you weren't doing anything wrong. In order to use UsedRange there needs to be a value in Range("A1").

    Try this:

    Please Login or Register  to view this content.
    Also added Option Compare Text above the code so the sub would recognize "MASTER", "Master" or "master".

  10. #10
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: Change the cell reference formula to cell value

    Hi John,

    Thanks yes it worked, is it possible to make it work for all the sheets, currently it works on only one sheet

    Thanks
    Jude

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Change the cell reference formula to cell value

    Try:

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: Change the cell reference formula to cell value

    Hi John
    Great, it worked, Many thanks once again.

    Regards
    Jude

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Change the cell reference formula to cell value

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. How to change a tab name with cell reference and formula?
    By Jared in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2018, 07:10 PM
  2. need to change a cell reference within formula
    By abelle82 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-19-2016, 04:18 PM
  3. Replies: 1
    Last Post: 02-11-2015, 01:56 PM
  4. [SOLVED] VBA to change cell reference of formula within a given cell
    By SixSix in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-08-2014, 04:30 AM
  5. Dragging formula, change sheet reference, but not cell reference
    By Kalilaya0419 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2013, 04:50 PM
  6. [SOLVED] Change row reference for a cell in formula?
    By gumdrops in forum Excel General
    Replies: 3
    Last Post: 11-20-2012, 05:22 AM
  7. VBA formula - reference particular cell (which can change)
    By ker9 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-27-2010, 03:31 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