Solved

Hiding formula VBA

Posted on 2014-10-27
6
133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

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

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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:Gašper Kamenšek
Gašper Kamenšek 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

624 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