• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How can i hide a formula on a particular cell?

Dear Excel Expert Users,

How can i hide a formula on a particular cell. Is this possible in Excel 2007? I'm attaching my working file were i would like to hide the formula given in "D2" so that it won't appear in the formula bar at the same time the date should be updated everyday.

Regards,

Sonjoe Joseph.
 

Attachments

  • CD.xlsx
    8.5 KB · Views: 7
Hi Sonjoe,

Select your cell, go to format cell > protection tab

Hide formula.PNG

After that, protect your sheet.

Regards,

Edit: You can mark both check boxes, as the cell contains formula.
 
Hi Sonjoe,

Select your cell, go to format cell > protection tab

View attachment 31141

After that, protect your sheet.

Regards,

Edit: You can mark both check boxes, as the cell contains formula.

Hello Khalid,

This method i know which is not useful for me since its potects the whole worksheet. I want a particular cell were the formulas should not be shown in the formula bar.

Regards,

Sonjoe Joseph
 
Hi,

All the cells are by default locked. Un-check all the cells which you need for editing.

since its potects the whole worksheet. I want a particular cell were the formulas should not be shown in the formula bar.

AFAIK, formula will be visible unless the sheet is protected.

Regards,
 
If we give a vba code the formula won't come.

I think sheet protection is necessary, even if you use vba.

I may be wrong (and not for the first time)

Let others comment on it.

Regards,
 

Hi !

VBA follows Excel behavior, it can not alter it !
So as written in post #2 picture : no effect until you protect the worksheet
 
Hi ,

You can turn off the Formula bar in Excel Options , which will ensure that the formula is not displayed till the cell is selected and the F2 key is pressed.

A simple macro such as the following will ensure that the cell D2 can never be selected.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
            If Not (Application.Intersect(Target, Range("D2")) Is Nothing) Then
              Application.EnableEvents = False
              Range("D3").Activate
              Application.EnableEvents = True
            End If
End Sub
Narayan
 
Hi ,

You can turn off the Formula bar in Excel Options , which will ensure that the formula is not displayed till the cell is selected and the F2 key is pressed.

A simple macro such as the following will ensure that the cell D2 can never be selected.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
            If Not (Application.Intersect(Target, Range("D2")) Is Nothing) Then
              Application.EnableEvents = False
              Range("D3").Activate
              Application.EnableEvents = True
            End If
End Sub
Narayan

Dear Narayan,

Thank you for responding...i will test this method and will surely get back to you in case i have any queries.

Regards,

Sonjoe Joseph.
 

Other VBA way is to not use a formula for the date
but update cell at workbook opening via its event …
 
Back
Top