ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Only print rows with text in col B (https://www.excelbanter.com/excel-programming/386561-only-print-rows-text-col-b.html)

SITCFanTN

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


Jim Jackson

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



All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com