Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
abdulie
 
Posts: n/a
Default How to remove rows for printing


I'm trying to put together a spreadsheet for ordering. There are approx
600 products and I would like to be able to only print the rows which
have data entered in the Quantity column. Does anyone have any clues as
to how I can do this?

I appreciate any ideas!

Cheers


--
abdulie
------------------------------------------------------------------------
abdulie's Profile: http://www.excelforum.com/member.php...o&userid=30538
View this thread: http://www.excelforum.com/showthread...hreadid=501930

  #2   Report Post  
Posted to microsoft.public.excel.misc
ScottO
 
Posts: n/a
Default How to remove rows for printing

Have you tried the Auto Filter feature?
Look in Data/AutoFilter - it's self-explanatory, but refer to
in-built help if required.
Rgds,
ScottO

"abdulie"
wrote in message
...
|
| I'm trying to put together a spreadsheet for ordering. There are
approx
| 600 products and I would like to be able to only print the rows
which
| have data entered in the Quantity column. Does anyone have any
clues as
| to how I can do this?
|
| I appreciate any ideas!
|
| Cheers
|
|
| --
| abdulie
| -------------------------------------------------------------------
-----
| abdulie's Profile:
http://www.excelforum.com/member.php...o&userid=30538
| View this thread:
http://www.excelforum.com/showthread...hreadid=501930
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
abdulie
 
Posts: n/a
Default How to remove rows for printing


Autofilter doesn't work because there's headings in the way. I really
need something that would look up ranges of cells and delete any that
have not got a numeric value.

I think I'll have to do it in a macro or code to complete both steps???


--
abdulie
------------------------------------------------------------------------
abdulie's Profile: http://www.excelforum.com/member.php...o&userid=30538
View this thread: http://www.excelforum.com/showthread...hreadid=501930

  #4   Report Post  
Posted to microsoft.public.excel.misc
Reg
 
Posts: n/a
Default How to remove rows for printing

Use DataFilter and create a criteria that extracts the non-blank rows to a
results area

"abdulie" wrote:


Autofilter doesn't work because there's headings in the way. I really
need something that would look up ranges of cells and delete any that
have not got a numeric value.

I think I'll have to do it in a macro or code to complete both steps???


--
abdulie
------------------------------------------------------------------------
abdulie's Profile: http://www.excelforum.com/member.php...o&userid=30538
View this thread: http://www.excelforum.com/showthread...hreadid=501930


  #5   Report Post  
Posted to microsoft.public.excel.misc
abdulie
 
Posts: n/a
Default How to remove rows for printing


Thanks for your suggestions...much appreciated!

I ended up solving it by creating a command buttin with the following
code attached:

Private Sub CommandButton1_Click()


Dim cell As Range
Application.ScreenUpdating = False
Application.StatusBar = "Please be patient while we prepare your order
for printing...This should take approximately 1 minute"
With Sheets("ORDER FORM - MASTER")
For Each cell In .Range("A29:A1000")
If cell.Value = "" Then cell.EntireRow.Hidden = True
Next cell
.Cells.PageBreak = xlPageBreakNone

.PrintOut preview:=True
.Range("A29:1000").EntireRow.Hidden = False
End With
Application.ScreenUpdating = True
End Sub


Cheers
:-)


--
abdulie
------------------------------------------------------------------------
abdulie's Profile: http://www.excelforum.com/member.php...o&userid=30538
View this thread: http://www.excelforum.com/showthread...hreadid=501930



  #6   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default How to remove rows for printing

Hi abdulie,
I can't fully understand why Autofilter won't do. However, the
following macro will ask you to select the heading of the column where
you are wanting rows with nonnumeric values to be hidden. It will then
do so for all the cells below the selected heading cells. If your
heading occupies more than one row make sure you select the whole
heading.

Public Sub HIDE_NONNUMERIC_QUANTITIES()
Dim C As Range
Dim stMessage As String
Dim rngHEADING As Range
Dim rngMODIFY As Range
Dim intColumn As Integer
Dim intBase As Long
stMessage = "Select the heading of the column "
stMessage = stMessage & "with nonnumeric values to be hidden."
Set rngHEADING = Application.InputBox _
(prompt:=stMessage, Type:=8, Default:=Selection.Address)
If rngHEADING.Columns.Count 1 Then
MsgBox "This macro can only work on a single column."
Exit Sub
End If
intColumn = rngHEADING.Column
intBase = 65537 - ActiveSheet.Range(Cells(65536, intColumn), _
Cells(65536, intColumn).End(xlUp)).Rows.Count
Set rngMODIFY = ActiveSheet.Range(Cells(rngHEADING.Rows.Count + 1, _
intColumn), Cells(intBase, intColumn))
Application.ScreenUpdating = False
For Each C In rngMODIFY
If Not (Application.IsNumber(C.Value)) Then C.EntireRow.Hidden = True
Next C
End Sub

To undo the hiding just click on any column header to select a whole
column then go FormatRowsUnhide.

Ken Johnson

Reply
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
How do I remove Duplicate rows? 85225 Excel Discussion (Misc queries) 15 March 9th 07 11:41 PM
How do I remove numerous blank rows from Excel spreadsheet? JP6262AMY Excel Discussion (Misc queries) 4 August 15th 05 10:39 PM
Row selections by row # OR by even/odd rows in another spreadsheet Tom Excel Discussion (Misc queries) 0 February 9th 05 04:03 PM
Remove empty rows in excel? Clbmgr Excel Discussion (Misc queries) 6 December 2nd 04 02:02 AM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM


All times are GMT +1. The time now is 09:52 PM.

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

About Us

"It's about Microsoft Excel"