Email:      Pass:    Pass?
Close Window   
TE
Subscribe for Email Updates!
Excel tips, help, and more!
E-mail:


Advertisements


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?

thanks


Similar Excel Video Tutorials

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

Thanks

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 spreadsheet and want to hide several rows at the top of it when printing.
I cannot use the print area option because when i do it prints too many blank sheets, i think maybe because i have the print titles enabled
Can someone please tell me how this can be done.?
Thanks
legepe


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 workbook that I want to show or hide a selection of cells depending on another cell when printing it.

Example

If cell x = A2A then display a certain cell set if anything else then exclude cell set from printing.

All help is greatly apreciated.

Thanks


Hi,

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?


Hello!

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

Thanks!
Minh




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,

Josh


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


Hi guys.

I am using this code to hide unwanted rows in a summary sheet I have.

Code:

Sub Hide_Rows()

Dim lastrow As Long
Dim r As Long

lastrow = Sheet3.Columns("A:A").Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).row

calc_on
Sheet3.Columns(1).EntireRow.Hidden = False 'unhides all rows
    
   r = 6
   For r = 6 To lastrow 
            Sheet3.Rows(r & ":" & r).EntireRow.AutoFit 'autofits the text and the row
        If Sheet3.cells(r, 1)  "Balance" And Sheet3.cells(r, 2) = 0 And Sheet3.cells(r, 1)  "" And Sheet3.cells(r, 2)  "" Then
            Sheet3.Rows(r & ":" & r).EntireRow.Hidden = True 'hides row
            Else
            
        End If
   Next
   
Range("A1").Select
   
End Sub


This works great. I only have about 50 rows, and it takes about half a second to run through the whole lot. I am very happy with it, until I print the page or run a print preview on it. After this, it takes about a second to hide each row.

The only thing I can think of is that the act of printing or previewing the print job creates a temporary print object, which is being updated at the same time as each row is hidden, thus accounting for the delay. This is really just a guess though, so please feel free to point and laugh at me if I'm wrong.

Can someone help me here? I'd love to know what causes the slowdown, and a fix for it if there is one.

So frustrating....


HI,

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 have a spreadsheet that I wish to hide a range of cells - I can see how to hide full spreadsheets and workbooks but dont know how do you hide a range of cells.

Please can someone explain how?
Thanks.


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.

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 = ";;;"
    ActiveWindow.SelectedSheets.PrintOut
    
    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





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'm using Excel 2007

I know that Excel/VBA does not have a specific AfterPrint event, but need to execute some commands after a user has printed the sheet or print-previewed it.

I have a worksheet that has some cells formatted so as to hide the formulae and results returned from the user - and the results are only revealed in a print out or Preview, by using the BeforePrint event to change the format.

However, once the printout has been produced, or ClosePrintPreview button has been clicked, I want VBA to re-format the target cells to re-hide the formulae and results.

How can this be achieved?
Thanks in advance.


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.
Mike


Hi Excel'ers

I have a search button (cmdVendorSearch) that I need to hide when I press the print button. Does any one know the code for that?

Thanks,

JP


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