Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a similar situation, but I am limited to not using macros as the
spreadsheet is to be sent to customers and we don't want to force the customer to enable macros.... Is there any way to tell Excel not to print cells that contain formulas but don't resolve to a value or otherwise resolve to an empty string (i.e. "") or a blank? Perhaps there is a special character code that the formula could put in the cells that would prevent them from printing just because they contain formulas? Any advice would be greatly appreciated! "Ken Wright" wrote: Am I right in thinking that you perhaps have input cells in say Cols A:E or so, and then some formula cells in say Col F. In Col F you have copied the formula down quite some way such that as you add data to the cells in Cols A:E then a value will pop up in Col F for those rows. If I am correct in that assumption, then assuming you can rely on for example Col A to only contain data in the rows you wish to print (No formulas returning blanks etc), then something like the following should work for you:- Sub PrintData() Dim LastRw As Long Dim ColW As Long Dim Rng As Range With ActiveSheet LastRw = .Cells(Rows.Count, "A").End(xlUp).Row ColW = .UsedRange.Column - 1 + .UsedRange.Columns.Count Set Rng = .Range(Cells(1, "A"), Cells(LastRw, ColW)) .PageSetup.PrintArea = Rng.Address ActiveWindow.SelectedSheets.PrintOut Copies:=1 End With End Sub -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "Jo-Anne" wrote in message ... Good Day All, I have a spreadsheet where a number of formulas exist, with no results in them as yet. Because I have the format set to Acct, $ the rows show up as $-. I don't want these to print, I only want to print up to and including the last line with a formula result. I also need it to be dynamic, such that if data is input into the next row down, the print range will adjust accordingly - any suggestions ?? Thanks Much --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.736 / Virus Database: 490 - Release Date: 09/08/2004 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing more than one worksheet area | Excel Discussion (Misc queries) | |||
Chart for showing Density of data in a specific area? | Excel Discussion (Misc queries) | |||
Setting formulas to pull data from a specific character spacing... | Excel Worksheet Functions | |||
Printing Specific data from Excel worksheet | Excel Discussion (Misc queries) | |||
Pivot table - printing specific data | Excel Discussion (Misc queries) |