May be, by hiding the rows that contains formula, before printing A cell contaning formula can be detected by *HasFormula property*
Please check this code if it helps. Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim MyRng As Range, r As Long, c As Integer Set MyRng = ActiveSheet.UsedRange Application.ScreenUpdating = False For r = 1 To MyRng.Rows.Count For c = 1 To MyRng.Columns.Count If MyRng(r, c).HasFormula Then MyRng(r, c).EntireRow.Hidden = True End If Next c Next r Application.ScreenUpdating = True End Sub best regards, siti Vi On Mon, Jun 6, 2011 at 5:10 AM, Bob <bobandrich...@comcast.net> wrote: > Is there a way to print the rows with data in them and not print the > rows with just the formula. My spreadsheet has several rows with > formulas in them and I only want to print the rows which I have added > data. I know you can select print area and all that. But mainly it's > for the inexperianced user that might have trouble setting the print > area tab. Is there a setting that I can set or a macro for this? > Thanks in Advance!!! > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
ctv_hiding formulasRow.xls
Description: MS-Excel spreadsheet