+ Reply to Thread
Results 1 to 6 of 6

How to display formula or custom text instead of value for a specific cell

  1. #1
    Registered User
    Join Date
    10-23-2018
    Location
    Ho Chi Minh City, Vietnam
    MS-Off Ver
    2016
    Posts
    2

    How to display formula or custom text instead of value for a specific cell

    Hi guys,

    I have a problem which I couldn't find an answer by googling. I hope I can get help here.

    I am asked to reproduce an excel spreadsheet (a rent roll), however, for some cells, I need to display not the result but some text or the formula.

    Example:

    =5.00*75%

    instead of displaying 3.75, it needs to show "5.00 x 75%" meanwhile Excel still needs to treat it as a number (3.75) to do further calculations.

    I have attached the screenshot of the pdf version of the spreadsheet I need to reproduce.

    ScreenHunter_200 Oct. 23 16.55.jpg

    Thanks a lot for your help.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to display formula or custom text instead of value for a specific cell

    Assuming 5.00 in A1 and 75% in A2, to get your text format use

    =TEXT(A1,"0.00")&" x "&TEXT(A2,"0%")

    Then to calculate it as numbers, refer to the original values, not the text string.

    =SUM(other values,A1*A2)

    Excel can not evaluate a text string as a numeric value, while there are workarounds, they are going to make a simple task far more complicated than needed.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: How to display formula or custom text instead of value for a specific cell

    Or perhaps try using the =FORMULATEXT() function?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: How to display formula or custom text instead of value for a specific cell

    But that would show the formula exactly as entered, which would include any cell references, not the values that they hold.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: How to display formula or custom text instead of value for a specific cell

    Quote Originally Posted by jason.b75 View Post
    But that would show the formula exactly as entered, which would include any cell references, not the values that they hold.
    True, good catch

  6. #6
    Registered User
    Join Date
    10-23-2018
    Location
    Ho Chi Minh City, Vietnam
    MS-Off Ver
    2016
    Posts
    2

    Re: How to display formula or custom text instead of value for a specific cell

    Thank you Jason & FDibbins for your helpful comments.

    Now since the spreadsheet i was trying to reproduce presented to me as printed pdf and I read something about custom views for printing same spreadsheet but in different format (landscape vs portrait, hide/unhide some columns, etc.) so maybe using custom views can help "mask" the those specific cells with the "alternate text".

    What do you think? Would it work?

+ 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: 2
    Last Post: 06-29-2017, 02:08 PM
  2. display cell in another if cell = specific text - formula in 3rd cell
    By NCopernicus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2016, 02:23 AM
  3. Replies: 5
    Last Post: 04-09-2014, 10:36 PM
  4. Replies: 2
    Last Post: 08-05-2013, 07:32 PM
  5. Formula to display value after specific text in filename
    By Rerock in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-15-2013, 03:49 PM
  6. Replies: 1
    Last Post: 06-22-2012, 02:18 PM
  7. Extract specific text in Cell A1 and display in A2
    By Dave32 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-22-2008, 08:27 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