Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!

Subscribe for Free Excel tips & more!

Free Excel Forum

Printing; Hide Cells

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

Is there a way to hide cells so they do not print?


View Answers     

Similar Excel Tutorials

Scale Data for Printing in Excel - Fit more onto a Printed Page
This tip shows you how to fit more Excel data onto a page for printing. This does not change the size, shape, or lo ...
Prevent Charts from Printing in Excel
This is how you prevent a chart from appearing when you print from Excel. This is a great feature when you want to ...
Hide or Unhide a Worksheet by Hand in Excel
I'll show you how to hide worksheets in Excel so that a user cannot see them but you can still access data on them ...
Hide Data Within a Worksheet in Excel
In Excel you can actually hide data that is stored within a worksheet. This allows you to show data that is useful ...

Helpful Excel Macros

Hide Comments in Excel Completely - Even Indicators Will not Appear
- Hide all comments in an Excel workbook. No indicators will be displayed and comments will not appear when you hover ove
Hide Specific Comments in Excel - Comments Will Still Display on Hover
- Hide specific comments in Excel with this macro. Comments are still visible on hovering over the cell that contains the
Hide Comments in Excel Partially - Comment Indicator Shows and Will Display on Hover
- Hide comments in Excel with this macro. Comment indicators will still appear in the cells and users will also be able to
Hide Formulas in a Worksheet and Prevent Deletion
- This macro will hide all formulas within a workbook and not allow them to be deleted. The page will not be protected li
Complete Guide to Printing in Excel Macros - PrintOut Method in Excel
- This free Excel macro illustrates all of the possible parameters and arguments that you can include in the PrintOut Meth

Similar Topics

Hello, is there a way to hide certain cells from printing? The cells can be seen when working on the sheet, but when it is printed, the cell are hidden/have no values.

I print normally from the file-menu, so a print-macro can't be used for this.
Somekind of script to ThisWorkbook so it is automatic?

I would like to hide ( not print ) a Cell when printing, although I would like to see it condense when editing.. It contains a Formula gathering totals from other form, although When printing I would like this Cell to be Blank. Short of Deleting It just before print, is there a Macro to do this.... ? I already I a Macro in place to print the sheet, can it just be added to that ?

Sheets("ADMIN TOOLS").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


Say for interest sake that the cell I wanted to "hide" was "B7"

Excel 2002
OK, this is driving me crazy. I've googled/read everything I can on this and cannot make it work. All I want to do is hide cells D12:G14 when I print the sheet. I still want them visible when viewing.
Can someone please explain how to do this? thanks

Hi all,

I have a question about shifting cells up in VBA. I have seen alot of posts while searching, with descriptions on how to hide whole rows, or deleting cells but what I need to do is this...

I have a blank column A and then parts listed in column B,C,D and E.

When I click on the Print button (macro that I have created) I want it to HIDE cells in B,C,D,E and shift the cells UP so that no blanks are visible. Then Print out

Can this be done???????

Thanx heaps

I have a sample form with a printable area of Rows 3 - 245 and Columns A-J. Column "A" will have an X either manually typed or by formula (I17>0"X","") I have created a print command button. I need this button for printing only to hide any rows that do not have the X value, hide columns "A" and "J", sort by column "C" then print.

Thanks to anybody that can help me with this code

I have an excel price sheet that include the following columns: Item Number, Item Description, Unit Cost, Unit Price, Quantity, Amount, etc. When Printing, I want all columns to print except for the Unit Cost column. Is there some way to automatically hide this in case I forget to make the column width zero before printing it? It would add peace of mind.

Thank you!

I have a dynamically ranged sheet with subtotals on it.

"Add pagebreak between subtotal groups" is checked, so each group prints on a separate page. This worked fine until now.

I now need to hide some columns before printing, so I created a Print macro that uses "Custom View" to hide the columns I don't want printed before printing.

This causes the pagebreak between subtotal groups to break, causing all the groups to print on one page instead of separate pages like a default subtotal page does.

Is there a better way to hide columns AND retain the pagebreak between subtotal groups?

This sheet is dynamically ranged and used by people unfamiliar with Excel, so a Macro/VBA solution would be ideal.

I can have the subtotals print on each page separately, or I can hide columns I need to hide, but I cannot figure out how to do both at the same time.

Anyone know a decent solution? Thanks!

I need to print a area but hide some column each time I print. I get an error message with this. Can someone help me fix this macro?

I want to Hide column K &L, and then unhide after I print.

Sub print_route()
.Columns("K:L").EntireColumn.Hidden = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
.Columns("K:L").EntireColumn.Hidden = False
End Sub

I have a command button designed to print specific area's on specific sheets

I need one particular sheet to hide rows first then print, so that my hidden work is not printed

This is my VBA

Please Login or Register  to view this content.

I need rows 13 thru 41 to be hidden before printing

Then if possible i need area H43:Z57 contents to be cleared or hidden, then once printing complete return the sheet back to normal.

Thanks in advance


I've got some cells on an invoice which are just there for the user, so they know what they have to enter in those cells, but I want some cells not to print.

Is there any way in which I can prevent some cells from printing or hide them from printing but they are visible to the user?


I am using the PrintOut method to print several worksheets. How do I hide
the "now printing" dialog that pops up?


I have a sheet that uses columns A through H. Column Headers are in Row 3 and the data continues down from there. Cells in Column A(A4 and down) are always a date.

Currently I am having users hide the rows between the Column Header row and the row of the first date of interest. And then highlight manually and print their selection. Inevitably, someone forgets to hit "print selection" on the print screen and prints 200 pages of blank cells. I would like to avoid this.

Is there a way to have a VBA macro prompt for a date range (or use specific cells that are entered as "start date" and "end date") to select the cells of interest and print them? (and also the header in row 3)

Secondly is there a way that I could prevent someone from printing the 200 blank pages? An option somewhere that I'm missing to Enable/Disable.

Maybe there is a way to hide all blank rows from the last row that has information to the last blank row?

Maybe there is a way to delete these empty rows?

Thanks much for any help,


Ok. I have tried every suggestion I can find on the forums. I've had luck with hiding rows with a checkbox, but I cannot get them to unhide when I uncheck the box.

Here's my scenario - (using Excel 2000) In an estimating spreadsheet I have a print range of A1:N74. What I'd like to do is add a checkbox or button so I can hide and unhide rows based on a null or zero in column range b5:b62. This is for printing purposes, but I can't get a 'beforeprint' event to work either. All I need is box checked and cells hide, box unchecked and cells show (unhide).

Any suggestions on this? here's the code I used to get them to hide, but no matter what I did I couldn't find the right coding to unhide.

Sub CheckBox1_Click()
Dim Rng As Range
Dim MyCell As Range
Set Rng = Range("B5:B62")
For Each MyCell In Rng
If MyCell.Value = "" Then
MyCell.EntireRow.Hidden = True
End If
Next MyCell
End Sub

Looking for a little help.

There is about 60 sheets in my work book but I only need to print out like 26 of them all formated the same.

This will print my 2008 numbers:
1) Sheets start with Rollup and end with TCB ( they are all in a row)
2) Need to hide column D-P and AE-AR
3) hide rows 64-95

I will be make multiple macros of this hide different section like on another macro instead of hiding rows 64-95, I will hide 32-60


I know the "hide" function can be used before clicking the print button. But is there anyway to make a particular column only on screen and not appear when the sheet is being printed without using the "hide" function?

I am making a spreadsheet off of one our work forms.

I am setting it up so it looks exactly like the sheet. For example the name of the sheet is Estimating Detail Sheet and has space for Job Name and Location. I would like to know if it is possible for when it comes to print that only certain data, like the numbers can be printed.

For example: say A1 has job name and A2 is the space for the name. Is there a way to hide A1 when it comes to printing.

I know there is hiding text, but I need it to be seen all the time. And I need something that will be permanent as the people who will be working off this sheet won't be able to turn hide on/off or much less know how to do it.

Is this possible to do? Any help is much appreciated!

I am trying to have a spreadsheet print onto an exsisting form. Therefore I only need certain cells to print.

I would either like only certain cells to print or hide the cells that I do not want to print.

When I searched the forums I found a similar topic and macro and tried to modify it to use but I get the debug error. Below is how I modified the code.


Sub Workbook_BeforePrint()
'Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Dim OldFormat As String
    Application.EnableEvents = False
    OldFormat = Sheets("Sheet1").Range("A1,A2,P2,Q2,R2,A3,I3,J3,B4,K4,B6,K6,A7,J7,F7,P7,A8,J8,A9,J9,A10,J10,A11,F11,H11,J11,P11,R11,A12,F12,J12,P12,A13,J13,A14,J14,A15,J15,A16,F16,H16,J16,P16,R16,A17,O17,A18,E18,H18,L18,N18,O18,O19,P19,Q19,A24,O24,A25,E25,H25,L25,N25,O26,O27,O28,O30,A31,I31,K31,A32,D32,E32,I32,K32,L32,N32,032,033,035,A37,O37,A38,D38,G38,K38,L38,N38,O40,A43").NumberFormatLocal
    Sheets("Sheet1").Range("A1,A2,P2,Q2,R2,A3,I3,J3,B4,K4,B6,K6,A7,J7,F7,P7,A8,J8,A9,J9,A10,J10,A11,F11,H11,J11,P11,R11,A12,F12,J12,P12,A13,J13,A14,J14,A15,J15,A16,F16,H16,J16,P16,R16,A17,O17,A18,E18,H18,L18,N18,O18,O19,P19,Q19,A24,O24,A25,E25,H25,L25,N25,O26,O27,O28,O30,A31,I31,K31,A32,D32,E32,I32,K32,L32,N32,032,033,035,A37,O37,A38,D38,G38,K38,L38,N38,O40,A43").NumberFormatLocal = ";;;"
    Sheets("Sheet1").Range("A1,A2,P2,Q2,R2,A3,I3,J3,B4,K4,B6,K6,A7,J7,F7,P7,A8,J8,A9,J9,A10,J10,A11,F11,H11,J11,P11,R11,A12,F12,J12,P12,A13,J13,A14,J14,A15,J15,A16,F16,H16,J16,P16,R16,A17,O17,A18,E18,H18,L18,N18,O18,O19,P19,Q19,A24,O24,A25,E25,H25,L25,N25,O26,O27,O28,O30,A31,I31,K31,A32,D32,E32,I32,K32,L32,N32,032,033,035,A37,O37,A38,D38,G38,K38,L38,N38,O40,A43").NumberFormatLocal = OldFormat
    Cancel = True
    Application.EnableEvents = True

Hey guys, i have another problem. I wrote this macro to print Area only with specific columns. Now my problem is to put filter to hide specific rows for certain Criteria.

Something like this: In my table in AE column are certain numbers, 1001,1002 ... etc. I want to hide all rows which have 1015 in AE column for print, and after print i want them to be shown.

Here is my macro:

Please Login or Register  to view this content.

This macro works as intended i only need to insert here what i stated in text above.


p.s I am sorry if i wrote something wrong, English is not my native language, i hope that u will understand what i wanted to say.

I would like to hide formulas in some cells(range of cells) but only result should be show on that cells.
For this can we use some command together with formula to hide or any macro for this. When we using the option/protect/hide the cell/ format menu also inactive. For avoid this can any one give a solution

I have lots of spreadsheets that I have with cells that contain error messages like
#DIV0!. These are sheets that I have set up to calculate totals, means, etc for the entire year. The problem is that other people look at and print these sheets and they don't want to see the error messages. Is there a way to hide these messages while leaving the formulas in place? I know it can be done when printing but I would like to do it on the screen display.

Thanks in advance for your help.

I have a spreadsheet with descriptions in Coumn A and corresponding amounts in column B. Some of these amounts in column B are 0 or are blank. Is there a way to print the report without showing the entire row if amount in column B is 0 or blank without having to go in and hide each row manually? As shown below, can I set excel to not print row 2 without having to go in and hide row 2?

Cash- Commerce: Operating 1000
Cash- Commerce: Sales Tax
Cash- Commerce: Sweep 1002
Cash- Commerce: Repo 1003

I have a report that is 12 pages in its entirety. I am using the Page Break view and setting the begining of each page using the page break feature. There are times when this report has no data on pages 4-5 and when I print I only want the pages that contain data (Page 1-10 of 10 instead of page 1-12 of 12).

If I hide the rows that comprise pages 4-5 and then print the report, my page count is still 12 and pages 4-5 are completely blank.

If I remove all the page breaks and hide the cells and then apply page breaks where appropriate, this effectively adjusts the number of pages printed.

My problem is that this report is automatically generated from information that is input on seven other worksheets and is part of a template. This template is used to launch a new data-entry series every week.

I do not want to have to format this report every week. Is there a way to hide pages that use the page break function and not have those pages print with the rest of the report?


I would appreciate some help. I have a print range defined, but I want to hide two entire columns within the print range, so they do not print. Of course, the columns hide on screen, but they are still included in the print range. Any suggestions?



With WS
        LastRow = .Range("A65536").End(xlUp).Row
        LastCol = .Range("IV3").End(xlToLeft).Column
        WS.PageSetup.PrintArea = Range(Cells(3, 1), Cells(LastRow, LastCol)).Address 'Print Range adjusted to not included Last Col
 WS.Columns("B:C").EntireColumn.Hidden = True


wonder if anyone might be able to help me here. I've a worksheet that contains a whole list of items in stock.

For example
Item Quantity
hot water bottle
cooking oils
breakfast oats

The above is an example of what might be seen in the spreadsheet. What i'd like to be able to do is before printing it out, i want items with 0 quantity to be shown only. So i decided to hide the rows that have items with no quantity. To do this, all i could think of is to have a button that may contain codes to hide the rows. The problem with that is the button will appear there in the printout. Is there any way of making the rows hidden before printing without using a button to trigger the code?

Thank you in advance

I'm a beginner and need some help....

How would I write a macro to hide a range of rows If a cell value is zero, then do the same for five additional ranges of rows?

In my words:
If AT214=0, hide rows 214 to 244
If AT245=0, hide rows 245 to 278
If AT279=0, hide rows 279 to 311
If AT312=0, hide rows 312 to 344
If AT345=0, hide rows 345 to 377
If AT378=0, hide rows 378 to 410

Any help to put me on the right path would be greatly appreciated!
Brisbane Austraila