LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Printing a specific area containing data and not formulas

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing more than one worksheet area Horace Excel Discussion (Misc queries) 2 November 28th 07 12:26 PM
Chart for showing Density of data in a specific area? CAB Excel Discussion (Misc queries) 1 October 23rd 07 04:27 PM
Setting formulas to pull data from a specific character spacing... trice_nb Excel Worksheet Functions 2 October 15th 07 05:37 PM
Printing Specific data from Excel worksheet Newtonboy Excel Discussion (Misc queries) 6 July 5th 06 10:23 AM
Pivot table - printing specific data Doug Excel Discussion (Misc queries) 1 April 24th 05 08:29 PM


All times are GMT +1. The time now is 07:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"