Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Only print rows with text in col B

I have a summary page that I update each day. I want to add code to my macro
that will only print the rows from Col A to Col F if there is text in col B.
I'm using this code but it doesn't seem to work, do you have any
suggestions, thank you.

ActiveSheet.PageSetUp.PrintArea = _
' "$A$1:$F$" & Cells(Rows.Count, "B").End(xlUp).Row

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Only print rows with text in col B

This is one way:

Columns("D").Select
Selection.Autofilter field:=1, Criteria1:=""""
--
Best wishes,

Jim


"SITCFanTN" wrote:

I have a summary page that I update each day. I want to add code to my macro
that will only print the rows from Col A to Col F if there is text in col B.
I'm using this code but it doesn't seem to work, do you have any
suggestions, thank you.

ActiveSheet.PageSetUp.PrintArea = _
' "$A$1:$F$" & Cells(Rows.Count, "B").End(xlUp).Row

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
The Print # command print not all rows from excel sheet to file pieros Excel Programming 17 February 22nd 07 03:33 PM
Only print rows with text mickey Excel Discussion (Misc queries) 0 February 9th 07 02:07 AM
Macro to hide rows with a certain cell empty then set print area and print tahrah Excel Programming 12 January 9th 07 03:47 AM
Print few rows with many colums so that rows wrap on printed pages usfgradstudent31 Excel Discussion (Misc queries) 1 October 20th 05 02:39 PM
Will not print exactly as print prviw, skps text, prints on eithr Susan Excel Discussion (Misc queries) 1 January 28th 05 11:44 PM


All times are GMT +1. The time now is 05:36 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"