Prevent the display of a cell value

RLY

New Member
Joined
May 25, 2010
Messages
44
Can I use code to prevent values in a row of cells from displaying? I do not want to physically hide the row or cells, I just want them to "appear" blank or clear (as if I used white font on a white background).

Thanks, Robert
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

BillP

Board Regular
Joined
May 16, 2007
Messages
61
You could use Conditional Formatting to do that (say, hide all instances of 0 by coloring it to match the background). To hide all numbers or a range of numbers, just make the conditional formatting cover the whole range.

One caveat: If someone highlights the cells (say, with a mouse), the data will show up--dim, but perfectly clear. Two caveat: If someone prints the spreadsheet with print settings set to Black and White, those numbers will print out the same as any other number (Page Setup, Sheet tab, Black and white).
 

RLY

New Member
Joined
May 25, 2010
Messages
44

ADVERTISEMENT

There are certain rows containing numeric values (calc results) that I want to hide 100% of the time (can't get rid of them because they're needed for other calcs). I was hoping for something other than conditional formatting to prevent the row from being highlighted & viewed...
How do I set a "custom format"?

thx, Robert
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,791
How do I set a "custom format"?
- Select the cells
- Right-Click, select "Format Cells ..."
- in the Number tab select "Custom"
- in the "Type" textbox enter your custom format, in this case:

;;;
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,791
P. S.

If your purpose is not aesthetic and you want to prevent the user to see the values in the cells, a formatting solution will not do, as you can still select the cell and read the value in the formula bar.
 
Last edited:

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,974
Messages
5,514,542
Members
409,006
Latest member
Parson9

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top