Solved

Hiding formula VBA

Posted on 2014-10-27
6
115 Views
Last Modified: 2014-10-27
Hi,

I need some vba code to hide the formulas in a range of cells "A18:W118"

I have tried to protect the range using locked/hidden and then protect sheet, however my slicers stop working then

Is there a VB solution?

Many thanks
Seamus
0
Comment
Question by:Seamus2626
6 Comments
 
LVL 2

Expert Comment

by:Glen Richmond
ID: 40406064
could always hide the formula bar?
0
 
LVL 25

Accepted Solution

by:
ProfessorJimJam earned 250 total points
ID: 40406074
Seamus2626

do the followings

select range "A18:W118"  and then right click then go to cell formatting then select custom formatting and then type three times semicolon ;;;  and then click ok.  then go to view tab and un-mark the formula bar.
0
 
LVL 2

Expert Comment

by:Glen Richmond
ID: 40406082
Ofcourse use the VBA recorder to capture the method suggested by ProfessorJimJam to include into VBA.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40406105
If you just want to hide those formulas, you have to set the Hidden property and protect the sheet. You haven't indicated what the slicers are used for, or where they are.
0
 
LVL 10

Assisted Solution

by:GasperK
GasperK earned 250 total points
ID: 40406131
You should do exactly what you did but in the protect Sheet also select the Edit Objects and Use PivotTable & PivotChart...
You will have the formulas hidden and also, your Slicers will work.
Protect Sheet options
0
 

Author Closing Comment

by:Seamus2626
ID: 40406199
Thanks guys
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iPhone excel activation issues 11 69
Excel Formula 4 28
Auto populate in Cascade dropdown 3 27
Problem counting secound table of filtered data. 9 3
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now