Consulting

Results 1 to 6 of 6

Thread: Solved: Remove Formula

  1. #1
    VBAX Contributor
    Joined
    May 2007
    Posts
    128
    Location

    Solved: Remove Formula

    Dear Sir,

    A1=1
    B1=1
    C1="=A1+B1"

    C1 displays 2
    When cursor in in C1 Then Formula bar displays =A1+B1

    I want to remove formula but value in C1 must remain.

    Please help

  2. #2
    VBAX Expert
    Joined
    Jul 2004
    Location
    Wilmington, DE
    Posts
    600
    Location
    If you are working in the UI, just type a 2 into that cell

    Again in the UI, to apply this over a range, use Copy/Paste Special.

    To apply this to a range in code:

    [VBA]
    Range("C:C").Value = Range("C:C").Value
    [/VBA]
    Regards,

    Patrick

    I wept for myself because I had no PivotTable.

    Then I met a man who had no AutoFilter.

    Microsoft MVP for Excel, 2007 & 2008

  3. #3
    VBAX Contributor
    Joined
    May 2007
    Posts
    128
    Location
    Quote Originally Posted by matthewspatrick
    If you are working in the UI, just type a 2 into that cell
    What is UI?

    I do not want to type again.
    Please suggest some other solution

  4. #4
    UI is user interface.
    Being in the UI means that you do things manually, by clicking and typing, instead of running a code.

    By applying it over a range, Patrick meant the following

    1. Select the cells with the formulas. E.g. select column C.
    2. From menu, select Edit / Copy
    3. From menu, select Edit / Paste Special
    4. On the appearing form, select "Values"
    5. Click OK

    HTH

    Jimmy
    -------------------------------------------------
    The more details you give, the easier it is to understand your question. Don't save the effort, tell us twice rather than not at all. The amount of info you give strongly influences the quality of answer, and also how fast you get it.

  5. #5
    VBAX Contributor
    Joined
    May 2007
    Posts
    128
    Location
    Ok thanks for helping

    Is it possible to hide formula from c1
    I mean calculation must updated in c1 but the formula should not appear.
    Or formula should not be edit.

    Thnaks

  6. #6
    VBAX Contributor
    Joined
    Aug 2006
    Location
    Hampshire, UK
    Posts
    140
    Location
    You can do this by applying worksheet protection:

    1. Right-click on the formula cell and choose Format Cells. On the Protection tab make sure the Hidden box is checked. Hit OK.
    2. Now go Tools>Protection>Protect Sheet and hit OK.

    Users now won't be able to edit/see the formula (you may want to apply a password to the protection so they can't simply unprotect the sheet).

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •