LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Ron de Bruin
 
Posts: n/a
Default

OK

Try this for a sheet named "Sheet1"

Note: I filter on the A column for non zeros so i assume that you don't have zeros in your
data in column A.(only zeros below your data)

Delete preview:=True if it is working correct

Sub Test_With_AutoFilter()
Dim WS As Worksheet
Dim rng As Range
Dim Str As String

Set WS = Sheets("sheet1") '<<< Change
'A1 is the top left cell of your filter range and the header of the first column
Set rng = WS.Range("A1").CurrentRegion '<<< Change
Str = "<0" '<<< Change

'Close AutoFilter first
WS.AutoFilterMode = False

'This example filter on the first column in the range (change the field if needed)
rng.AutoFilter Field:=1, Criteria1:=Str
WS.PrintOut preview:=True
WS.AutoFilterMode = False
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"wastedwings" wrote in message ...
The data consists of columns A through E with the header row being on Row 1

"Ron de Bruin" wrote:

We can make a filter / print macro
Do you have headers above your data and if you do in which row
Can we check one column in your data table if it contains data < then 0 (which column)

I will make a example for you if you give me the information


--
Regards Ron de Bruin
http://www.rondebruin.nl


"wastedwings" wrote in message ...
Ok, I tried that. Now when I check the print preview, it prints like 17 pages
of empty cells. How can I create a macro to Print using "print if cells
contain...."?

"Ron de Bruin" wrote:

but contain links to another worksheet for future linking

Maybe this is a easy solution for you

If you have zero's in the cells then you can use
ToolsOptions...View
Uncheck Zero values

--
Regards Ron de Bruin
http://www.rondebruin.nl


"wastedwings" wrote in message
...
I have a worksheet that contains information that updates from another
worksheet (contains links). I print the worksheet out each time it is
updated, but I would like to create a macro that would automatically select
the print area of the cells that contain information, instead of going in and
selecting the print area. Since there are cells that do not have information,
but contain links to another worksheet for future linking, hitting the print
button will not print the cells that contain information only, but will only
print a portion of the worksheet.

"Ron de Bruin" wrote:

Hi wastedwings

Can you give more information


--
Regards Ron de Bruin
http://www.rondebruin.nl


"wastedwings" wrote in message
...
How do I create a macro to automatically select the print area that has
contents in certain cells?











 
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
changing print area in an entire workbook lschuh Excel Worksheet Functions 7 August 4th 05 02:52 PM
How do I set a macro to print variable number of pages in excel? Livio Excel Discussion (Misc queries) 1 July 30th 05 12:15 AM
How do I create a macro of editing keystrokes? scjanner Excel Discussion (Misc queries) 0 January 21st 05 11:07 PM
How can I set up a Macro to automatically run when I open a speci. Rick Martin Excel Discussion (Misc queries) 1 January 13th 05 05:06 PM
Automatically launch a macro when a fil is opened One-Leg Excel Discussion (Misc queries) 1 December 15th 04 08:12 PM


All times are GMT +1. The time now is 11:50 AM.

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"